Navigation Customization¶
Organize your wiki's navigation structure.
Basic Navigation¶
Define navigation in mkdocs.yml:
nav:
- Home: index.md
- Getting Started:
- Installation: getting-started/installation.md
- Quick Start: getting-started/quick-start.md
- User Guide:
- Overview: guide/overview.md
- Tutorials: guide/tutorials.md
- About: about.md
Auto-Navigation¶
Omit nav: to auto-generate from file structure:
MkDocs creates navigation automatically from this structure.
Section Index Pages¶
Use index.md as section overview:
nav:
- Home: index.md
- Getting Started:
- getting-started/index.md
- Installation: getting-started/installation.md
Enable in theme:
Navigation Tabs¶
Show top-level sections as tabs:
Expanding Sections¶
Hide Navigation¶
Per-page metadata:
Navigation Icons¶
Add icons to navigation:
Or use Material icons in custom navigation.
Best Practices¶
Keep It Shallow
Limit nesting to 2-3 levels for better UX.
Logical Grouping
Group related pages together.
Clear Names
Use descriptive, scannable names.