Navigation
Tabs, groups, page entries, external links, anchors, and hidden pages.
Use docs.json to control tabs, sidebar groups, and page order.
Start simple, then add structure only if you need it.
Quick start#
Use one tab with one group:
When to use each pattern#
navigation.tabs: best default for most docs sitesnavigation.dropdowns: top-level categories; currently rendered as tabsnavigation.groups+navigation.pages: good for a single simple sectionnavigation.versions: multiple product versions — only the default version renders today; the others are reported and skippednavigation.languages: translated docs — same current limitation as versions
Page entries#
Inside pages, you can mix:
String slugs — the file path without extension:
Page objects — for custom labels, icons, tags, or hidden pages:
title(orlabel, which wins): custom sidebar texticon: a lucide icon name shown beside the labeltag: a short badge shown after the labelhidden: keep the page out of the sidebar and search — it is still built and reachable by URL
External links:
Nested groups — arbitrarily deep, with an optional landing page:
Set collapsible: false to keep a group open without a chevron. Groups also
accept hidden, which hides the group and everything in it.
Collapsible groups#
Groups are collapsible and show a chevron by default:
- Top-level groups start expanded
- Nested groups start collapsed unless
expanded: trueis set or the current page is inside them
Navigating into a group reopens it. The interaction.drilldown key controls
what clicking a group header does:
true: expanding a group also navigates to itsroot(or first) pagefalse: the header only expands and collapses- unset: headers with a
rootpage navigate (title is a link; chevron toggles); others only expand/collapse
Anchors#
Anchors render as prominent links above the sidebar:
Anchors that contain their own pages or groups are recognized but not
implemented yet.
Hidden pages#
Any tab, group, page, or link accepts hidden: true. Hidden pages are still
prerendered and reachable by URL, but they:
- do not appear in the sidebar
- are skipped by prev/next paging
- are excluded from
sitemap.xmland markednoindex(unlessseo.indexingis"all")
More examples#
Dropdowns#
Versions#
Languages#
Common mistakes#
You will see a config error when:
navigationis missing- no pages are discovered
- duplicate page file slugs exist
- duplicate route slugs exist
- referenced docs files do not exist in
content/docs
Slug tips#
.mdand.mdxextensions are optional inpagesentriesdocs/prefix is accepted and removed- trailing
/indexcollapses to the parent route slug "index"maps to/docs