Navigation

How folders and meta.json build the sidebar

The sidebar is generated from your folder tree — there's no separate navigation file to keep in sync. A meta.json in each folder names it and sets the order of its pages.

meta.json

Every folder of pages has a meta.json:

{
  "title": "Guides",
  "pages": ["index", "quickstart", "concepts"]
}
  • title is the label shown for the folder.
  • pages lists the entries in the order they should appear.

Ordering pages

Entries in pages are file names without the .mdx extension. List them in the order you want; anything you leave out still appears, after the ones you named.

{ "pages": ["index", "quickstart", "concepts"] }

Groups

Sub-folders become sidebar groups. Put related pages in a folder with its own meta.json, and its title becomes the group heading with its pages listed underneath:

guides/
  index.mdx
  get-started/
    meta.json      { "title": "Get started", "pages": ["quickstart", "concepts"] }
    quickstart.mdx
    concepts.mdx

That's exactly how this site's sidebar is built — each group you see (Get started, Writing content, Customize, …) is a folder. Pages placed directly in a section (like this section's index.mdx) sit at the top, above the groups.

The "..." rest glob and separators

Two extras help with generated or long sections:

  • "..." in a pages array inserts every page you didn't name explicitly, at that position — handy when pages are generated for you.
  • In an API reference sidebar, a "---Label---" entry renders as a non-clickable section heading between endpoint groups.
{ "pages": ["...", "---Getting Started---", "authentication"] }

Next: components

The building blocks you can use in any page.