File tree Expand file tree Collapse file tree 15 files changed +105
-78
lines changed Expand file tree Collapse file tree 15 files changed +105
-78
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ title : Hello World
3+ description : |
4+ Your first `document`
5+ You'll love it!
6+ ---
7+
8+ Hey there! Fumadocs is the docs framework that also works on React Router!
9+
10+ ## Heading
11+
12+ Hello World
13+
14+ <Cards >
15+ <Card title = " Learn more about React Router" href = " https://reactrouter.com" />
16+ <Card title = " Learn more about Fumadocs" href = " https://fumadocs.dev" />
17+ </Cards >
18+
19+ ``` ts
20+ console .log (' I love React!' );
21+ ```
22+
23+ ### Heading
24+
25+ #### Heading
26+
27+ | Head | Description |
28+ | ------------------------------- | ----------------------------------- |
29+ | ` hello ` | Hello World |
30+ | very ** important** | Hey |
31+ | _ Surprisingly_ | Fumadocs |
32+ | very long text that looks weird | hello world hello world hello world |
Original file line number Diff line number Diff line change 1+ {
2+ "icon" : " \uD83D\uDCDA " ,
3+ "root" : true
4+ }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 11---
2- title : Hello World
3- description : |
4- Your first `document`
5- You'll love it!
2+ title : Home
3+ layout : home
64---
75
8- Hey there! Fumadocs is the docs framework that also works on React Router!
9-
10- ## Heading
11-
12- Hello World
13-
14- <Cards >
15- <Card title = " Learn more about React Router" href = " https://reactrouter.com" />
16- <Card title = " Learn more about Fumadocs" href = " https://fumadocs.dev" />
17- </Cards >
6+ Welcome to Fumapress! Open [ docs] ( /docs ) .
187
198``` ts
20- console .log (' I love React! ' );
9+ console .log (' Hello World ' );
2110```
22-
23- ### Heading
24-
25- #### Heading
26-
27- | Head | Description |
28- | ------------------------------- | ----------------------------------- |
29- | ` hello ` | Hello World |
30- | very ** important** | Hey |
31- | _ Surprisingly_ | Fumadocs |
32- | very long text that looks weird | hello world hello world hello world |
Original file line number Diff line number Diff line change 1313 "fumadocs-mdx" : " workspace:*" ,
1414 "fumadocs-ui" : " workspace:*" ,
1515 "fumapress" : " workspace:*" ,
16- "isbot" : " ^5.1.31" ,
1716 "react" : " ^19.2.0" ,
1817 "react-dom" : " ^19.2.0" ,
1918 "react-router" : " ^7.9.3"
2928 "react-router-devtools" : " ^5.1.3" ,
3029 "tailwindcss" : " ^4.1.14" ,
3130 "typescript" : " ^5.9.3" ,
32- "vite" : " ^7.1.9" ,
33- "vite-tsconfig-paths" : " ^5.1.4"
31+ "vite" : " ^7.1.9"
3432 }
3533}
Original file line number Diff line number Diff line change 88 "moduleResolution" : " bundler" ,
99 "jsx" : " react-jsx" ,
1010 "baseUrl" : " ." ,
11- "paths" : {
12- "@/*" : [" ./app/*" ]
13- },
1411 "esModuleInterop" : true ,
1512 "verbatimModuleSyntax" : true ,
1613 "noEmit" : true ,
Original file line number Diff line number Diff line change 3333 "zod" : " ^4.1.11"
3434 },
3535 "devDependencies" : {
36+ "@mdx-js/mdx" : " ^3.1.1" ,
3637 "@types/mdx" : " ^2.0.13" ,
3738 "@types/node" : " ^24.6.2" ,
3839 "@types/react" : " ^19.2.0" ,
Original file line number Diff line number Diff line change 1+ import type { DefaultMDXOptions } from 'fumadocs-mdx/config' ;
12import {
23 defineConfig ,
34 defineDocs ,
45 frontmatterSchema ,
6+ metaSchema ,
57} from 'fumadocs-mdx/config' ;
68import { z } from 'zod' ;
9+ import type { FumapressConfig } from './global' ;
10+ import type { ProcessorOptions } from '@mdx-js/mdx' ;
711
8- export const docs = defineDocs ( {
9- dir : 'content' ,
10- docs : {
11- schema : frontmatterSchema . extend ( {
12- layout : z . string ( ) . default ( 'docs' ) ,
12+ export interface ContentConfig {
13+ mdx ?:
14+ | ( {
15+ preset ?: 'fumadocs' ;
16+ } & DefaultMDXOptions )
17+ | ( {
18+ preset : 'minimal' ;
19+ } & ProcessorOptions ) ;
20+ }
21+
22+ export async function createContentConfig ( config : FumapressConfig ) {
23+ return {
24+ docs : defineDocs ( {
25+ dir : 'content' ,
26+ docs : {
27+ schema : frontmatterSchema
28+ . extend ( {
29+ layout : z . string ( ) . default ( 'docs' ) ,
30+ } )
31+ . loose ( ) ,
32+ } ,
33+ meta : {
34+ schema : metaSchema . loose ( ) ,
35+ } ,
36+ } ) ,
37+ default : defineConfig ( {
38+ mdxOptions : config . content ?. mdx ,
1339 } ) ,
14- } ,
15- } ) ;
40+ } ;
41+ }
1642
17- export default defineConfig ( ) ;
43+ export type FumadocsMDXConfig = Awaited < ReturnType < typeof createContentConfig > > ;
You can’t perform that action at this time.
0 commit comments