Auto Sidebar Plugin
The auto sidebar plugin scans your documentation directory and automatically generates navigation and sidebar configuration based on the file structure and_meta.json files.
How It Works
The plugin:- Scans the documentation directory recursively
- Finds
_meta.jsonfiles that define navigation structure - Generates nav and sidebar configuration automatically
- Supports multi-language and multi-version documentation
Configuration
The plugin is automatically enabled. You can customize it indoom.config.ts:
Meta Files
Navigation Meta
Place_meta.json in your root docs directory for top-level navigation:
docs/_meta.json
Sidebar Meta
Place_meta.json in subdirectories to define sidebar structure:
docs/guide/_meta.json
Meta File Format
Nav Item Types
Simple Link:Sidebar Item Types
String (simple):Directory Structure Example
Root _meta.json
docs/_meta.json
Guide _meta.json
docs/guide/_meta.json
Advanced _meta.json
docs/guide/advanced/_meta.json
Generated Config
Navigation:Multi-Language Support
The plugin automatically handles multi-language documentation:Multi-Version Support
The plugin supports versioned documentation:Plugin Options
Title Extraction
If nolabel is specified, the plugin extracts titles from:
- The
titlein frontmatter - The first
# Headingin the markdown - The filename as fallback
Best Practices
- Use Consistent Naming - Use kebab-case for file and directory names
- Add Labels - Provide custom labels for better readability
- Organize Logically - Group related content in directories
- Order Matters - Items in
_meta.jsondefine the display order - Test Navigation - Verify links work before deploying