File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { source } from '@/app/source';
22import type { Metadata } from 'next' ;
33import { DocsPage , DocsBody } from 'fumadocs-ui/page' ;
44import { notFound } from 'next/navigation' ;
5+ import defaultMdxComponents from 'fumadocs-ui/mdx' ;
56
67export default async function Page ( props : {
78 params : Promise < { slug ?: string [ ] } > ;
@@ -17,7 +18,7 @@ export default async function Page(props: {
1718 < DocsBody >
1819 < h1 > { page . data . title } </ h1 >
1920 { page . data . description && < p > { page . data . description } </ p > }
20- < Content />
21+ < Content components = { defaultMdxComponents } />
2122 </ DocsBody >
2223 </ DocsPage >
2324 ) ;
Original file line number Diff line number Diff line change 1- import { docs , meta } from '@/.source /server' ;
1+ import { docs } from 'fumadocs-mdx:collections /server' ;
22import { loader } from 'fumadocs-core/source' ;
33
44export const source = loader ( {
55 baseUrl : '/docs' ,
6- source : {
7- files : docs . map ( ( doc : any ) => ( {
8- type : 'page' as const ,
9- path : doc . path ,
10- data : doc ,
11- } ) ) ,
12- } as any ,
6+ source : ( docs as any ) . toFumadocsSource ( ) ,
137} ) ;
Original file line number Diff line number Diff line change 11import { defineDocs , defineConfig } from 'fumadocs-mdx/config' ;
22
3- // Export without type inference to avoid pnpm zod resolution issues
4- export const { docs, meta } = defineDocs ( {
3+ export const docs = defineDocs ( {
54 dir : 'content/docs' ,
65} ) as any ;
76
8- export default defineConfig ( {
9- mdxOptions : {
10- remarkPlugins : [ ] ,
11- rehypePlugins : [ ] ,
12- } ,
13- } ) ;
7+ export default defineConfig ( ) ;
Original file line number Diff line number Diff line change 3232 "paths" : {
3333 "@/*" : [
3434 " ./*"
35+ ],
36+ "fumadocs-mdx:collections/*" : [
37+ " ./.source/*"
3538 ]
3639 }
3740 },
You can’t perform that action at this time.
0 commit comments