Skip to content

Collapsible links under subcategories in sidebar #1352

@byq77

Description

@byq77

🚀 Feature

Would it be possible to make links under subcategories also collapsible like in case of categories in sidebar?

I would like the code:

{
  "docs": {
    "Category 1": [
      {
        "type": "subcategory",
        "label": "Subcategory 1",
        "ids": [
          "link1",
          "link2"
        ]
      },
      {
        "type": "subcategory",
        "label": "Subcategory 2",
        "ids": [
          "link3",
          "link4"
        ]
      },
    ],
  }
}

to generate something like this:

Category 1         v
   Subcategory 1   v
      - link1
      - link2
   Subcategory 2   v
      - link3
      - link4

Now option docsSideNavCollapsible: true in siteConfig.js makes only links under categories collapsible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions