chore: add fumadocs setup and config for docs
This commit is contained in:
parent
93f904e429
commit
e10e9f17e7
|
|
@ -1,3 +1,4 @@
|
|||
node_modules/
|
||||
.next/
|
||||
.source/
|
||||
next-env.d.ts
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
import { createMDX } from "fumadocs-mdx/next";
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
|
||||
export default nextConfig;
|
||||
const withMDX = createMDX();
|
||||
|
||||
export default withMDX(nextConfig);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -5,15 +5,20 @@
|
|||
"scripts": {
|
||||
"dev": "next dev -p 3002",
|
||||
"build": "next build",
|
||||
"start": "next start -p 3002"
|
||||
"start": "next start -p 3002",
|
||||
"postinstall": "fumadocs-mdx"
|
||||
},
|
||||
"dependencies": {
|
||||
"fumadocs-core": "15.8.5",
|
||||
"fumadocs-mdx": "14.3.0",
|
||||
"fumadocs-ui": "15.8.5",
|
||||
"next": "^15",
|
||||
"react": "^19",
|
||||
"react-dom": "^19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@types/mdx": "^2",
|
||||
"@types/node": "^22",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
import { defineDocs, defineConfig } from "fumadocs-mdx/config";
|
||||
|
||||
export const docs = defineDocs({
|
||||
dir: "content/docs",
|
||||
docs: {
|
||||
postprocess: {
|
||||
valueToExport: ["structuredData"],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
// Skip tableCell so search snippets are actual sentences, not table cells
|
||||
// like "Flag" / "Default" / "Purpose". Paragraphs + headings only.
|
||||
mdxOptions: {
|
||||
remarkStructureOptions: {
|
||||
types: ["paragraph", "blockquote", "heading"],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -13,8 +13,13 @@
|
|||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./*"],
|
||||
".source": ["./.source/server.ts"]
|
||||
},
|
||||
"plugins": [{ "name": "next" }]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"include": ["next-env.d.ts", "source.config.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue