MuseMVP Docs
Docs System

Quick Configuration

Configure docs visibility, docs alias, sidebar structure, and page tree source.

The docs module renders MDX from content/docs and builds sidebar navigation, powered by Fumadocs and Content Collections. This guide covers scope, entry points, and common config.

Fast Edit Path

Toggle docs module

// src/config/index.ts
ui: {
  docs: {
    enabled: true,  // Set false to redirect /docs/** to home
  },
}

Docs alias and menu copy

// src/config/index.ts
i18n: {
  locales: {
    en: {
      docsAlias: "Docs",
      headerMenuMap: { docs: "MVP Docs" },
    },
    zh: {
      docsAlias: "文档",
      headerMenuMap: { docs: "MVP 文档" },
    },
  },
}
// 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
TypePathDescription
Doc contentcontent/docs/**/*.mdxSupports *.zh.mdx, *.en.mdx for i18n
Category metacontent/docs/<category>/meta.{locale}.jsonSub-category pages and title
Root metacontent/docs/meta.{locale}.jsonRoot sidebar order and groups
Iconsfrontmatter iconMapped by docsSource.icon() to icon components

Config Reference

ConfigLocationDefaultEffect
config.ui.docs.enabledsrc/config/index.tstrueControls /docs/** access; when false, redirects to home
config.i18n.locales.*.docsAliassrc/config/index.ts"Docs" / "文档"Docs site title and page title suffix
content/docs/meta.{locale}.jsoncontent/docsLeft sidebar order and groups
docsSource.icon()src/lib/docs-source.tsMaps 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.