docs.json and controls the sidebar your users see when they visit your site. Every page you want to surface must be listed in this configuration — if a page is missing from docs.json, it will not appear in the sidebar, even if the file exists on disk.
Navigation structure
通用文档站点 navigation is organized across three levels, from broadest to most specific:- Tabs — top-level sections that appear in the main navigation bar, useful for separating major areas like “Documentation” and “API Reference”
- Groups — named sections within a tab that cluster related pages together in the sidebar
- Pages — individual MDX files listed inside a group, referenced by their path relative to the docs root
docs.json
Using groups only
For simpler sites that do not need top-level tabs, you can skip thetabs layer and define groups directly under navigation. This keeps the structure flat and is a good fit for documentation that covers a single product area.
docs.json
Page paths
Page paths indocs.json are relative to your docs root and do not include the .mdx file extension. For example, a file located at guides/content.mdx is referenced in navigation as "guides/content".
| File path | Navigation entry |
|---|---|
introduction.mdx | "introduction" |
guides/content.mdx | "guides/content" |
api/authentication.mdx | "api/authentication" |
Sidebar titles
By default, 通用文档站点 uses thetitle from a page’s frontmatter as the label in the sidebar. For pages with long titles, you can override this with the sidebarTitle frontmatter field to display a shorter label without changing the page title itself.