File tree Expand file tree Collapse file tree 9 files changed +44
-24
lines changed
Expand file tree Collapse file tree 9 files changed +44
-24
lines changed Original file line number Diff line number Diff line change 1- import { createMDX } from ' fumadocs-mdx/next' ;
1+ import { createMDX } from " fumadocs-mdx/next" ;
22
33const withMDX = createMDX ( ) ;
44
Original file line number Diff line number Diff line change 99 "postinstall" : " fumadocs-mdx"
1010 },
1111 "dependencies" : {
12+ "fumadocs-core" : " 15.3.1" ,
13+ "fumadocs-mdx" : " 11.6.3" ,
14+ "fumadocs-ui" : " 15.3.1" ,
15+ "lucide-react" : " ^0.525.0" ,
1216 "next" : " 15.3.1" ,
1317 "react" : " ^19.1.0" ,
14- "react-dom" : " ^19.1.0" ,
15- "fumadocs-ui" : " 15.3.1" ,
16- "fumadocs-core" : " 15.3.1" ,
17- "fumadocs-mdx" : " 11.6.3"
18+ "react-dom" : " ^19.1.0"
1819 },
1920 "devDependencies" : {
2021 "@types/node" : " 22.15.12" ,
Original file line number Diff line number Diff line change 33 defineDocs ,
44 frontmatterSchema ,
55 metaSchema ,
6- } from ' fumadocs-mdx/config' ;
6+ } from " fumadocs-mdx/config" ;
77
88// You can customise Zod schemas for frontmatter and `meta.json` here
99// see https://fumadocs.vercel.app/docs/mdx/collections#define-docs
Original file line number Diff line number Diff line change 1- import { source } from ' @/lib/source' ;
1+ import { source } from " @/lib/source" ;
22import {
33 DocsPage ,
44 DocsBody ,
55 DocsDescription ,
66 DocsTitle ,
7- } from ' fumadocs-ui/page' ;
8- import { notFound } from ' next/navigation' ;
9- import { createRelativeLink } from ' fumadocs-ui/mdx' ;
10- import { getMDXComponents } from ' @/mdx-components' ;
7+ } from " fumadocs-ui/page" ;
8+ import { notFound } from " next/navigation" ;
9+ import { createRelativeLink } from " fumadocs-ui/mdx" ;
10+ import { getMDXComponents } from " @/mdx-components" ;
1111
1212export default async function Page ( props : {
1313 params : Promise < { slug ?: string [ ] } > ;
@@ -19,7 +19,14 @@ export default async function Page(props: {
1919 const MDXContent = page . data . body ;
2020
2121 return (
22- < DocsPage toc = { page . data . toc } full = { page . data . full } >
22+ < DocsPage
23+ toc = { page . data . toc }
24+ tableOfContent = { {
25+ style : "clerk" ,
26+ single : false ,
27+ } }
28+ full = { page . data . full }
29+ >
2330 < DocsTitle > { page . data . title } </ DocsTitle >
2431 < DocsDescription > { page . data . description } </ DocsDescription >
2532 < DocsBody >
Original file line number Diff line number Diff line change 1- import { DocsLayout } from ' fumadocs-ui/layouts/docs' ;
2- import type { ReactNode } from ' react' ;
3- import { baseOptions } from ' @/app/layout.config' ;
4- import { source } from ' @/lib/source' ;
1+ import { DocsLayout } from " fumadocs-ui/layouts/docs" ;
2+ import type { ReactNode } from " react" ;
3+ import { baseOptions } from " @/app/layout.config" ;
4+ import { source } from " @/lib/source" ;
55
66export default function Layout ( { children } : { children : ReactNode } ) {
77 return (
Original file line number Diff line number Diff line change 1- @import ' tailwindcss' ;
2- @import ' fumadocs-ui/css/neutral .css' ;
3- @import ' fumadocs-ui/css/preset.css' ;
1+ @import " tailwindcss" ;
2+ @import " fumadocs-ui/css/vitepress .css" ;
3+ @import " fumadocs-ui/css/preset.css" ;
Original file line number Diff line number Diff line change 1- import { docs } from '@/.source' ;
2- import { loader } from 'fumadocs-core/source' ;
1+ import { docs } from "@/.source" ;
2+ import { loader } from "fumadocs-core/source" ;
3+ import { icons } from "lucide-react" ;
4+ import { createElement } from "react" ;
35
46// See https://fumadocs.vercel.app/docs/headless/source-api for more info
57export const source = loader ( {
68 // it assigns a URL to your pages
7- baseUrl : ' /docs' ,
9+ baseUrl : " /docs" ,
810 source : docs . toFumadocsSource ( ) ,
11+ icon ( icon ) {
12+ if ( ! icon ) {
13+ // You may set a default icon
14+ return ;
15+ }
16+ if ( icon in icons ) return createElement ( icons [ icon as keyof typeof icons ] ) ;
17+ } ,
918} ) ;
Original file line number Diff line number Diff line change 1- import defaultMdxComponents from ' fumadocs-ui/mdx' ;
2- import type { MDXComponents } from ' mdx/types' ;
1+ import defaultMdxComponents from " fumadocs-ui/mdx" ;
2+ import type { MDXComponents } from " mdx/types" ;
33
44// use this function to get MDX components, you will need it for rendering MDX
55export function getMDXComponents ( components ?: MDXComponents ) : MDXComponents {
You can’t perform that action at this time.
0 commit comments