Files
docs/node_modules/vitepress/dist/client/app/ssr.js

11 lines
346 B
JavaScript
Raw Normal View History

2025-08-27 14:05:33 +08:00
// entry for SSR
import { renderToString } from 'vue/server-renderer';
import { createApp } from './index';
export async function render(path) {
const { app, router } = await createApp();
await router.go(path);
const ctx = { content: '', vpSocialIcons: new Set() };
ctx.content = await renderToString(app, ctx);
return ctx;
}