---
title: Navigation
subtitle: Organize the sidebar with tabs, sections, pages, links, folders, changelogs, and API sections, and control every page's URL precisely.
description: All navigation node types (section, page, link, folder, changelog, api), tabs, hiding and collapsing, tags, and slug generation rules.
---

## Basic structure

There are two ways to write navigation:

<CodeGroup>
```yaml Without tabs
navigation:
  - section: Get started
    slug: start
    contents:
      - page: Introduction
        path: pages/introduction.mdx
        slug: introduction
      - page: Quickstart
        path: pages/quickstart.mdx
        slug: quickstart
```

```yaml With tabs
tabs:
  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.yml
```
</CodeGroup>

As 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

```yaml
- 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: verify
```

<ParamField path="section" type="string" required>Section title; translated through `labels.yml` in non-default locales.</ParamField>
<ParamField path="contents" type="NavItem[]">Child nodes, which can include further nested sections.</ParamField>
<ParamField path="path" type="string">Overview page. Clicking the section title opens it.</ParamField>
<ParamField path="slug" type="string">The URL segment the section contributes; generated from the title by default.</ParamField>
<ParamField path="skip-slug" type="boolean">Don't contribute a URL segment; child pages hang directly under the parent level.</ParamField>
<ParamField path="icon" type="string">Icon.</ParamField>
<ParamField path="icon-style" type="plain | tile" default="plain">Icon style; see [Icon style](#icon-style).</ParamField>
<ParamField path="collapsed" type="boolean">Collapsed by default.</ParamField>
<ParamField path="hidden" type="boolean">Not shown in the sidebar; pages are still built.</ParamField>
<ParamField path="tags" type="string | string[]">Tags next to the title; see [Tags](#tags). They can also go in the overview page's frontmatter.</ParamField>

### Page

```yaml
- page: Authentication
  path: pages/authentication.mdx
  slug: authentication
  icon: lucide:key-round
  tags: Beta
```

<ParamField path="page" type="string" required>Sidebar title. The page frontmatter's `title` takes precedence as the page heading, and `sidebar-title` takes precedence as the sidebar title.</ParamField>
<ParamField path="path" type="string" required>The page file, `.mdx` or `.md`, relative to the project root.</ParamField>
<ParamField path="slug" type="string">The page's URL segment.</ParamField>
<ParamField path="icon" type="string">Icon (can also be set with `icon` in frontmatter).</ParamField>
<ParamField path="icon-style" type="plain | tile" default="plain">Icon style; see [Icon style](#icon-style).</ParamField>
<ParamField path="hidden" type="boolean">Not shown in the sidebar and excluded from previous / next links and `llms.txt`, but the page is still reachable by URL.</ParamField>
<ParamField path="noindex" type="boolean">Adds `noindex` and removes the page from the sitemap.</ParamField>
<ParamField path="tags" type="string | string[]">Tags next to the title; see [Tags](#tags). They can also go in the page's frontmatter, which wins.</ParamField>

### 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.

```yaml
- page: Billing
  path: pages/billing.mdx
  tags: [New, Free trial]
  tags-position: right
  tags-color: warning
```

Writing 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](../features/i18n.mdx#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"]`.

<ParamField path="tags" type="string | string[]">One or more tags. Several rotate in turn; text that doesn't fit rests for 2 seconds, then slides so readers can see all of it.</ParamField>
<ParamField path="tags-position" type="inline | right" default="inline">Position in the sidebar: `inline` right after the title, `right` at the right end of the row. After the page title they always follow the title.</ParamField>
<ParamField path="tags-style" type="background | border" default="background">Style: `background` is a light fill, `border` an outline.</ParamField>
<ParamField path="tags-color" type="string">Color; the theme color by default (or write `theme`). Use a [Callout](../components/callout.mdx) 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 `#`).</ParamField>
<ParamField path="tags-interval" type="number" default="6">Seconds between tags. When a tag needs to slide, it finishes one round first.</ParamField>
<ParamField path="tags-weight" type="number">How many half-width characters of a tag to show; a CJK character counts as 2, so `8` fits about 4 CJK characters. Longer text slides. Without it, about 96px in the sidebar and 180px after the page title.</ParamField>

### 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](./docs-yml.mdx#tabs-and-navigation) (when shown in the sidebar) all take it; [sidebar links](./docs-yml.mdx#sidebar-links) use this style by default.

```yaml
- page: Quickstart
  path: pages/quickstart.mdx
  icon: lucide:rocket
  icon-style: tile
```

Pages 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.

<ParamField path="icon-style" type="plain | tile" default="plain">`plain` shows just the icon, `tile` puts it in a small square. No effect without an icon.</ParamField>

### Link

```yaml
- link: Status
  href: https://status.acme.com
  icon: lucide:activity
```

`href` 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:

```yaml
- folder: pages/tutorials
  title: Tutorials
  slug: tutorials
  collapsed: false
```

- `.md` / `.mdx` files 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

```yaml
- changelog: changelog      # Directory
  title: Changelog
  slug: changelog
  icon: lucide:history
```

Every `.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](./changelog.mdx) for how to write entries, the overview page, layouts (including the blog), search and filtering on the index page, and URL rules.

### API section

```yaml
- 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
```

<ParamField path="api" type="string" required>Section title, also used as the title of the API overview page.</ParamField>
<ParamField path="openapi" type="string" required>OpenAPI 3.x / Swagger 2 spec (YAML or JSON).</ParamField>
<ParamField path="api-name" type="string">API id; generated from the title by default. The spec is published at `/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.</ParamField>
<ParamField path="summary" type="string">MDX body for the overview page; falls back to the spec's `info.description` when unset.</ParamField>
<ParamField path="tags" type="string[]">Only include groups with these OpenAPI tags.</ParamField>
<ParamField path="flattened" type="boolean">List all endpoints directly under the section instead of grouping by tag; URLs don't include a group segment either.</ParamField>
<ParamField path="slug / skip-slug / icon / icon-style / collapsed / hidden" type="">Same as for sections.</ParamField>

See [Import OpenAPI](../api/openapi.mdx) 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):

```text
<basepath> / <locale> / <product> / <version> / <tab> / <section…> / <page>
```

<Steps>
  <Step title="Variant prefix">
    `basepath`, plus `/<lang>` for non-default locales, `/<slug>` for the product, and `/<slug>` for non-default versions. See [Core concepts](../get-started/concepts.mdx#variants-product--version--locale).
  </Step>
  <Step title="Tab segment">
    `tabs.<id>.slug`, generated from `display-name` by default; omitted with `skip-slug: true`.
  </Step>
  <Step title="Section segments">
    Each level of section contributes its `slug` (generated from the title by default), omitted with `skip-slug: true`. An API section's segment is omitted automatically when it's the same as its parent's (e.g. the "API Reference" section inside the "API Reference" tab).
  </Step>
  <Step title="Page segment">
    `slug`, generated from the `page` title in the navigation by default. A section overview page (`path`) has no segment of its own; its URL is the section's URL.
  </Step>
</Steps>

**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:

```mdx title="pages/legacy/auth.mdx"
---
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` |
