File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,13 @@ import { remarkMdxMermaid } from "fumadocs-core/mdx-plugins";
77// see https://fumadocs.vercel.app/docs/mdx/collections#define-docs
88export const docs = defineDocs ( {
99 dir : "content" ,
10+ // Async mode - enables runtime compilation for faster dev server startup
1011 docs : {
1112 async : true ,
1213 } ,
14+ // To switch back to sync mode (pre-compilation), comment out the docs config above and uncomment below:
15+ // (sync mode - pre-compiles all content at build time)
16+ // No additional config needed for sync mode - just remove the docs config
1317} ) ;
1418
1519export default defineConfig ( {
Original file line number Diff line number Diff line change @@ -16,9 +16,13 @@ export default async function Page(props: {
1616 const page = source . getPage ( params . slug ) ;
1717 if ( ! page ) notFound ( ) ;
1818
19- // Load the compiled content asynchronously
19+ // Async mode - load the compiled content at runtime
2020 const { body : MDXContent , toc } = await page . data . load ( ) ;
2121
22+ // To switch back to sync mode, comment out the line above and uncomment below:
23+ // const MDXContent = page.data.body;
24+ // const toc = page.data.toc;
25+
2226 return (
2327 < DocsPage toc = { toc } full = { page . data . full } >
2428 < DocsTitle > { page . data . title } </ DocsTitle >
You can’t perform that action at this time.
0 commit comments