Skip to content

Flatten nested sidebar items #2

@dundalek

Description

@dundalek

When there is a single namespace the nested hierarchy is not useful and takes extra clicks to expand.

DeepinScreenshot_select-area_20240112171554

For example instead of

com >
  org >
    project >
      foo
      bar

we could flatten as

com.org.project >
  foo
  bar

Is there also a way to perhaps have some items in sidebar expanded by default? With some heuristic to expand e.g. if there are less than 10 children items.

Collapsible categories are collapsed by default. If you want them to be expanded on the first render, you can set collapsed to false:
https://docusaurus.io/docs/sidebar/items#expanded-categories-by-default

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions