-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
160 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
{ | ||
"name": "docs-fd", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev", | ||
"start": "next start", | ||
"postinstall": "fumadocs-mdx" | ||
}, | ||
"dependencies": { | ||
"next": "15.2.0", | ||
"react": "^19.0.0", | ||
"react-dom": "^19.0.0", | ||
"fumadocs-ui": "15.0.15", | ||
"fumadocs-core": "15.0.15", | ||
"fumadocs-mdx": "11.5.6" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "22.13.8", | ||
"@types/react": "^19.0.10", | ||
"@types/react-dom": "^19.0.4", | ||
"typescript": "^5.8.2", | ||
"@types/mdx": "^2.0.13", | ||
"@tailwindcss/postcss": "^4.0.9", | ||
"tailwindcss": "^4.0.9", | ||
"postcss": "^8.5.3" | ||
} | ||
} | ||
"name": "docs-fd", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev", | ||
"start": "next start", | ||
"postinstall": "fumadocs-mdx" | ||
}, | ||
"dependencies": { | ||
"next": "15.2.0", | ||
"react": "^19.0.0", | ||
"react-dom": "^19.0.0", | ||
"fumadocs-ui": "15.0.15", | ||
"fumadocs-core": "15.0.15", | ||
"fumadocs-mdx": "11.5.6" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "22.13.8", | ||
"@types/react": "^19.0.10", | ||
"@types/react-dom": "^19.0.4", | ||
"typescript": "^5.8.2", | ||
"@types/mdx": "^2.0.13", | ||
"@tailwindcss/postcss": "^4.0.9", | ||
"tailwindcss": "^4.0.9", | ||
"postcss": "^8.5.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export default { | ||
plugins: { | ||
'@tailwindcss/postcss': {}, | ||
}, | ||
plugins: { | ||
'@tailwindcss/postcss': {}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { defineDocs, defineConfig } from 'fumadocs-mdx/config'; | ||
import { defineConfig, defineDocs } from 'fumadocs-mdx/config'; | ||
|
||
export const docs = defineDocs({ | ||
dir: 'content/docs', | ||
dir: 'content/docs', | ||
}); | ||
|
||
export default defineConfig({ | ||
mdxOptions: { | ||
// MDX options | ||
}, | ||
mdxOptions: { | ||
// MDX options | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import type { ReactNode } from 'react'; | ||
import { HomeLayout } from 'fumadocs-ui/layouts/home'; | ||
import { baseOptions } from '@/app/layout.config'; | ||
import { HomeLayout } from 'fumadocs-ui/layouts/home'; | ||
import type { ReactNode } from 'react'; | ||
|
||
export default function Layout({ children }: { children: ReactNode }) { | ||
return <HomeLayout {...baseOptions}>{children}</HomeLayout>; | ||
return <HomeLayout {...baseOptions}>{children}</HomeLayout>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import Link from 'next/link'; | ||
|
||
export default function HomePage() { | ||
return ( | ||
<main className="flex flex-1 flex-col justify-center text-center"> | ||
<h1 className="mb-4 text-2xl font-bold">Hello World</h1> | ||
<p className="text-fd-muted-foreground"> | ||
You can open{' '} | ||
<Link | ||
href="/docs" | ||
className="text-fd-foreground font-semibold underline" | ||
> | ||
/docs | ||
</Link>{' '} | ||
and see the documentation. | ||
</p> | ||
</main> | ||
); | ||
return ( | ||
<main className="flex flex-1 flex-col justify-center text-center"> | ||
<h1 className="mb-4 text-2xl font-bold">Hello World</h1> | ||
<p className="text-fd-muted-foreground"> | ||
You can open{' '} | ||
<Link | ||
href="/docs" | ||
className="text-fd-foreground font-semibold underline" | ||
> | ||
/docs | ||
</Link>{' '} | ||
and see the documentation. | ||
</p> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
import { source } from '@/lib/source'; | ||
import defaultMdxComponents from 'fumadocs-ui/mdx'; | ||
import { | ||
DocsPage, | ||
DocsBody, | ||
DocsDescription, | ||
DocsTitle, | ||
DocsBody, | ||
DocsDescription, | ||
DocsPage, | ||
DocsTitle, | ||
} from 'fumadocs-ui/page'; | ||
import { notFound } from 'next/navigation'; | ||
import defaultMdxComponents from 'fumadocs-ui/mdx'; | ||
|
||
export default async function Page(props: { | ||
params: Promise<{ slug?: string[] }>; | ||
params: Promise<{ slug?: string[] }>; | ||
}) { | ||
const params = await props.params; | ||
const page = source.getPage(params.slug); | ||
if (!page) notFound(); | ||
const params = await props.params; | ||
const page = source.getPage(params.slug); | ||
if (!page) notFound(); | ||
|
||
const MDX = page.data.body; | ||
const MDX = page.data.body; | ||
|
||
return ( | ||
<DocsPage toc={page.data.toc} full={page.data.full}> | ||
<DocsTitle>{page.data.title}</DocsTitle> | ||
<DocsDescription>{page.data.description}</DocsDescription> | ||
<DocsBody> | ||
<MDX components={{ ...defaultMdxComponents }} /> | ||
</DocsBody> | ||
</DocsPage> | ||
); | ||
return ( | ||
<DocsPage toc={page.data.toc} full={page.data.full}> | ||
<DocsTitle>{page.data.title}</DocsTitle> | ||
<DocsDescription>{page.data.description}</DocsDescription> | ||
<DocsBody> | ||
<MDX components={{ ...defaultMdxComponents }} /> | ||
</DocsBody> | ||
</DocsPage> | ||
); | ||
} | ||
|
||
export async function generateStaticParams() { | ||
return source.generateParams(); | ||
return source.generateParams(); | ||
} | ||
|
||
export async function generateMetadata(props: { | ||
params: Promise<{ slug?: string[] }>; | ||
params: Promise<{ slug?: string[] }>; | ||
}) { | ||
const params = await props.params; | ||
const page = source.getPage(params.slug); | ||
if (!page) notFound(); | ||
const params = await props.params; | ||
const page = source.getPage(params.slug); | ||
if (!page) notFound(); | ||
|
||
return { | ||
title: page.data.title, | ||
description: page.data.description, | ||
}; | ||
return { | ||
title: page.data.title, | ||
description: page.data.description, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { DocsLayout } from 'fumadocs-ui/layouts/docs'; | ||
import type { ReactNode } from 'react'; | ||
import { baseOptions } from '@/app/layout.config'; | ||
import { source } from '@/lib/source'; | ||
import { DocsLayout } from 'fumadocs-ui/layouts/docs'; | ||
import type { ReactNode } from 'react'; | ||
|
||
export default function Layout({ children }: { children: ReactNode }) { | ||
return ( | ||
<DocsLayout tree={source.pageTree} {...baseOptions}> | ||
{children} | ||
</DocsLayout> | ||
); | ||
return ( | ||
<DocsLayout tree={source.pageTree} {...baseOptions}> | ||
{children} | ||
</DocsLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import 'tailwindcss'; | ||
@import 'fumadocs-ui/css/neutral.css'; | ||
@import 'fumadocs-ui/css/preset.css'; | ||
@import "tailwindcss"; | ||
@import "fumadocs-ui/css/neutral.css"; | ||
@import "fumadocs-ui/css/preset.css"; | ||
|
||
@source '../../node_modules/fumadocs-ui/dist/**/*.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.