Configuration
Sections
Split documentation into top-level sections with separate navigation tabs, dropdowns, and external links.
Sections let you split your documentation into separate top-level areas. Each section appears as a tab in the navigation bar and gets its own sidebar.
Defining Sections
Add a sections array to your config. Each section needs a label (display name) and a path (folder name inside your docs directory):
sections: [
{ label: "Framework", path: "framework" },
{ label: "Language", path: "language" },
], With this config, your docs folder structure should look like:
Each folder name matches the path value from your section config.
How Sections Work
Each section maps to a subfolder in your docs directory. When a user clicks a section tab in the navbar, the sidebar updates to show only the pages within that section.
External Links
You can also add sections that link to external URLs using href instead of path:
sections: [
{ label: "Guide", path: "guide" },
{ label: "GitHub", href: "https://github.com/user/repo" },
], Dropdown Sections
Sections can have children for dropdown menus:
sections: [
{
label: "Resources",
children: [
{ label: "Blog", href: "https://blog.example.com" },
{ label: "Changelog", href: "/changelog" },
],
},
],