Docs System
Quick Configuration
Configure docs alias, sidebar structure, and page tree source.
The docs module renders MDX from content/docs and builds sidebar navigation, powered by Fumadocs and Fumadocs MDX. This guide covers scope, entry points, and common config.
Fast Edit Path
Docs alias
// src/config/index.ts
i18n: {
locales: {
en: {
docsAlias: "Docs",
},
zh: {
docsAlias: "文档",
},
},
}Nav labels for Docs live in SwitchHeader and home.json, not in a headerMenuMap.
Sidebar structure
// content/docs/meta.en.json
{
"title": "MuseMVP Docs",
"icon": "BookOpen",
"pages": ["index", "tech-stack", "development", "quick-build", "cms"]
}pages Order
The pages array defines left sidebar order. Sub-categories (e.g. cms) need a matching content/docs/cms/meta.{locale}.json.
Doc Organization Rules
cms-docs.en.mdx
cms-blog.en.mdx
meta.en.json
index.en.mdx
meta.en.json
| Type | Path | Description |
|---|---|---|
| Doc content | content/docs/**/*.mdx | Supports *.zh.mdx, *.en.mdx for i18n |
| Category meta | content/docs/<category>/meta.{locale}.json | Sub-category pages and title |
| Root meta | content/docs/meta.{locale}.json | Root sidebar order and groups |
| Icons | frontmatter icon | Mapped by docsSource.icon() to icon components |
Config Reference
| Config | Location | Default | Effect |
|---|---|---|---|
config.i18n.locales.*.docsAlias | src/config/index.ts | "Docs" / "文档" | Docs site title and page title suffix |
| Header Docs label | SwitchHeader + home.json | "Docs" / "文档" | Nav link text |
content/docs/meta.{locale}.json | content/docs | — | Left sidebar order and groups |
docsSource.icon() | src/lib/docs-source.ts | — | Maps frontmatter icon to icon component |
Adding a New Doc
Create *.zh.mdx and/or *.en.mdx under content/docs or a subdirectory.
Add frontmatter: title, description, icon.
Register the page path in the pages array of the relevant meta.{locale}.json.
Related Docs
- Fumadocs Special Blocks — Callout, Cards, Steps, etc.
- Blog Configuration — Blog content and frontmatter