The navigation system is how users browse your documentation. This guide explains how to set it up in config.json.
Understanding Navigation Structure
Your navigation has three levels:
Think of it like organizing books:
- Tabs are like different bookcases ("Documentation", "API", "Guides")
- Groups are like shelves in a bookcase ("Getting Started", "Advanced Topics")
- Pages are like individual books on a shelf
Basic Navigation Example
Here's a simple navigation setup explained line by line:
What this creates:
- A tab called "Documentation" in the top navigation
- A group called "Getting Started" in the sidebar (with a rocket icon)
- Two pages in that group: Introduction and Installation
Step-by-Step: Adding Pages
Create your MDX file
First, create your documentation file in the /docs folder:
Add page path to config.json
Add the page path to the pages array in config.json:
Important rules:
- ✅ Start from inside
/docs(don't include/docs/in the path) - ✅ No
.mdxfile extension - ✅ Use forward slashes
/even on Windows - ❌ Don't use backslashes
\
Save and check
Save config.json and check your browser. The page should appear in the sidebar!
If it doesn't appear, check the terminal for errors.
Navigation Properties
Tabs
Tabs appear in the top navigation bar. Each tab can have its own set of groups and pages.
Example with multiple tabs:
Groups
Groups organize pages into sections in the sidebar.
Lucide icon name to display next to the group name
Popular icons:
rocket- Getting startedsettings- Configurationcode- Code/API docsbook- Guides/tutorialscomponent- UI componentszap- Quick startshield- Securitydatabase- Data/storage
See all icons: lucide.dev/icons
Pages
Pages are the file paths to your MDX documents.
Path format:
Complete Example
Here's a realistic navigation setup with multiple tabs and groups:
Global Anchors
Global anchors appear above all tabs in the sidebar. Use them for external links like GitHub, Discord, or community resources.
Common Patterns
Documentation + Components
A common setup for documentation sites with component examples:
API Documentation
For API documentation with versioning:
Page Ordering
Pages appear in the sidebar in the order you list them in the pages array:
To reorder: Just rearrange the items in the array.
Troubleshooting
Best Practices
Don't go more than 3 levels deep (Tab → Group → Page). Users get lost in deep navigation.
Keep it shallow
"Getting Started" is better than "Intro". "API Reference" is better than "API".
Use descriptive names
Put related pages together. Think about the user's learning journey.
Group logically
3-5 tabs maximum. Too many tabs overwhelm users.
Limit tabs
Next Steps
Colors & Theming
Customize your site's colors and theme
Typography
Configure fonts for your documentation
Banner
Add announcement banners to your site