Navigation
Organize the sidebar with tabs, sections, pages, links, folders, changelogs, and API sections, and control every page's URL precisely.
Basic structure
There are two ways to write navigation:
navigation:
- section: Get started
slug: start
contents:
- page: Introduction
path: pages/introduction.mdx
slug: introduction
- page: Quickstart
path: pages/quickstart.mdx
slug: quickstarttabs:
guides:
display-name: Guides
slug: guides
api:
display-name: API Reference
slug: api
navigation:
- tab: guides
layout:
- section: Get started
slug: start
contents:
- page: Introduction
path: pages/introduction.mdx
slug: introduction
- tab: api
layout:
- api: API Reference
openapi: openapi.ymlAs long as every entry in navigation is a - tab:, it's treated as tabbed navigation; referencing an id not declared in tabs: reports a config/tab error. When versions or products are configured, navigation lives in their respective files (which also support tabs:, merged with the tabs in docs.yml).
Node types
Section
- section: Webhook
slug: webhooks
icon: lucide:webhook
path: pages/webhooks/overview.mdx # Optional: section overview page; its URL is the section itself
collapsed: true # Collapsed by default
tags: Beta # Tag next to the title
contents:
- page: Verify signatures
path: pages/webhooks/verify.mdx
slug: verifyPage
- page: Authentication
path: pages/authentication.mdx
slug: authentication
icon: lucide:key-round
tags: Betatitle takes precedence as the page heading, and sidebar-title takes precedence as the sidebar title.Tags
tags show next to a section or page title, for hints such as "New", "Beta" or "Free trial"; several rotate in turn. Tags also show after the page title.
- page: Billing
path: pages/billing.mdx
tags: [New, Free trial]
tags-position: right
tags-color: warningWriting them in the page's frontmatter (a section's overview page, for a section) is preferred, with the same fields; when both are set, the frontmatter wins field by field. On a multilingual site, write each language's tags in the frontmatter of its translations; anything left out follows the source. To turn a source setting back to the default, write it out: tags-style: background, tags-position: inline or tags-color: theme. For the navigation, see Per-language navigation files.
Items in the brackets need no quotes. Quote an item when it contains a comma, a bracket, : or #, starts with a symbol such as *, &, ! or @, or is exactly true, false or null, e.g. [New, "Save 20, today"].
inline right after the title, right at the right end of the row. After the page title they always follow the title.theme). Use a Callout intent — note, info, warning, success, error, tip, check, launch, danger — for the same colors, or a color code such as "#e5484d" (quote it in YAML, since it starts with #).8 fits about 4 CJK characters. Longer text slides. Without it, about 96px in the sidebar and 180px after the page title.Icon style
An item's icon shows to the left of its title. With icon-style: tile, the icon sits in a small outlined square that fills with the accent color, with a white icon, on hover and on the current page: a way to set a few key entries apart from ordinary pages. Sections, pages, links, folders, changelogs, API sections and tabs (when shown in the sidebar) all take it; sidebar links use this style by default.
- page: Quickstart
path: pages/quickstart.mdx
icon: lucide:rocket
icon-style: tilePages can also set it in their frontmatter. When both are set the navigation wins; write icon-style: plain there to switch back to the plain style.
Link
- link: Status
href: https://status.acme.com
icon: lucide:activityhref can be an external URL or an internal path (for example, the link to /llms.txt at the bottom of this site's sidebar).
Folder
Generates a section automatically from a directory, with no need to register each page:
- folder: pages/tutorials
title: Tutorials
slug: tutorials
collapsed: false.md/.mdxfiles in the directory are sorted by file name; numeric file name prefixes (01-,02_,3.) are used only for sorting and are stripped from the URL and default title.- Page titles come from the frontmatter
title, or the file name when absent (first letter capitalized,-/_turned into spaces). - Subdirectories become nested sections, with titles generated from the directory names.
For example, with the configuration above under the "Guides" tab, pages/tutorials/01-install.mdx lives at /guides/tutorials/install.
Changelog
- changelog: changelog # Directory
title: Changelog
slug: changelog
icon: lucide:historyEvery .md / .mdx file in the directory whose name starts with a date (YYYY-MM-DD, MM-DD-YYYY, or MM-DD-YY) is an entry; it generates a timeline index page, a detail page per day, and RSS / Atom / JSON feeds. blog: is an alias (default title "Blog"). See Changelog for how to write entries, the overview page, layouts (including the blog), search and filtering on the index page, and URL rules.
API section
- api: API Reference
api-name: payments # API id: unrelated to the URL; used for download URLs and snippet references
openapi: openapi/payments.yml
summary: pages/api/overview.mdx # Optional: overview page body
slug: reference
tags: [Payments, Refunds] # Optional: only include endpoints with these tags
flattened: true # Optional: don't group by tag
collapsed: true/openapi/<api-name>.json and other URLs, and components like <EndpointRequestSnippet endpoint="<api-name>::POST /path"> use it to tell multiple APIs apart. Setting it explicitly is recommended when the title isn't ASCII.See Import OpenAPI for details.
Hiding, collapsing, and status
| Desired effect | How |
|---|---|
| Page exists but isn't in the sidebar | hidden: true |
| Page exists but isn't indexed by search engines | noindex: true (or noindex: true in page frontmatter) |
| Section collapsed by default | collapsed: true |
| Tab not shown in the header | tabs.<id>.hidden: true |
| Show a tag such as "Beta" next to the title | tags: Beta (several rotate: tags: [New, Free trial]) |
Slug rules
A page's final URL is made up of the following segments joined together (empty segments are omitted):
<basepath> / <locale> / <product> / <version> / <tab> / <section…> / <page>Variant prefix
basepath, plus /<lang> for non-default locales, /<slug> for the product, and /<slug> for non-default versions. See Core concepts.
Generated from the title uses the same algorithm as GitHub heading anchors: lowercase, spaces become -, punctuation removed. Non-Latin characters such as Chinese are kept, so page: 快速开始 produces /快速开始 by default. Always set slug for non-Latin titles.
Override the full path with frontmatter
A slug in the page frontmatter replaces the tab, section, and page segments, keeping only the variant prefix:
---
title: Authentication (legacy)
slug: auth
---No matter where it sits in the navigation, its URL is /auth in the default locale, /en/auth in English, and /v0/auth in v0.
Conflict detection
When two pages end up with the same URL, biti check reports a nav/duplicate-slug error and suggests setting an explicit slug on one of them.
URL examples from this site
| Navigation position | URL |
|---|---|
| Guides › Get started › Quickstart | /guides/get-started/quickstart |
Components › Overview (section skip-slug) | /components/overview |
Components › Callouts and labels (section skip-slug) › Callouts | /components/callout |
API Reference › Platform API (skip-slug) › Sites › Create site | /api-reference/sites/create-site |
Changelog (tab skip-slug) | /changelog |
| English › Quickstart | /en/guides/get-started/quickstart |
| v0 › Quickstart | /v0/guides/get-started/quickstart |