Search code examples
docusaurus

Make sidebar not collapsable and always expanded in docusaurus V2 classic preset


If you use classic template when creating the doc, you'll get a sidebar like this:

(Docusaurus v2)

How can I keep using this preset and have a sidebar always expanded like this:

(ComponentKit)


Solution

  • Sidebar collapsing is a theme configuration attribute. You can modify this:

    // docusaurus.config.js
    module.exports = {
      // ...
      themeConfig: {
        sidebarCollapsible: false,
        // ...
      },
    };