On this page
Sidebar Demo
Welcome to the sidebar demo section. This section demonstrates the category metadata features using frontmatter in index.md files.
Category Configuration
This category is configured with:
sidebar.position: 0- Appears first in the sidebarsidebar.label: "Sidebar Demo"- Custom label in sidebarsidebar.collapsible: true- Can be collapsed/expandedsidebar.collapsed: false- Starts expanded
Reordering Demo
Notice that the sidebar items below appear in this order:
- Custom Class (position 10) - alphabetically second, displayed first
- Fancy Label (position 30) - alphabetically first, displayed second
This demonstrates that sidebar.position controls the order, regardless of file names!
Available Frontmatter Options
All sidebar-related fields are now grouped under the sidebar object:
sidebar.position- Control the order of items in the sidebarsidebar.label- Override the display label in the sidebarsidebar.className- Add custom CSS classes to the sidebar itemsidebar.collapsible- Whether the category can be collapsed (default: true)sidebar.collapsed- Initial collapsed state (default: true)sidebar.customProps- Arbitrary metadata for custom components