Skip to main content

sidebars.js

This file exports the navigation structure used for the documents within the project. It organizes documents into categories and subcategories with collapsible navigation items for the Docusaurus sidebar.


Structure Details

  • type: Specifies the navigation item type (category or doc).
  • label: Display label for categories or documents.
  • collapsed: Whether the category is collapsed by default.
  • collapsible: If the category can be collapsed.
  • items: Nested navigation items (documents or subcategories).
  • id: Document id used for routing/linking.
  • link: (optional) Used for category linking to a document.

Usage

This file is automatically generated by the generateSidebars.js script during the project start, build, and deploy processes. No additional action is required.


Example

module.exports = {
docs: [
{
type: "category",
label: "Desktop Applications",
collapsed: false,
items: [
{
type: "category",
label: "RMC-TotalRisk",
collapsed: true,
items: [
"desktop-applications/rmc-totalrisk/users-guide/v1.0/00-document-info",
"desktop-applications/rmc-totalrisk/users-guide/v1.0/01-preface",
// ...more chapters
],
},
// ...more applications
],
},
// ...more categories
],
};

Best Practices

  • Do not manually edit sidebars.js; always use the provided scripts to regenerate it.
  • Use numeric prefixes (e.g., 00-, 01-, 02-) in .mdx filenames to control sidebar ordering.
  • Use clear, descriptive titles in frontmatter for sidebar labels.

For more on sidebar configuration and navigation, see the Docs Folder Guide.