Unnested Sidebar
By default, the Starlight Sidebar Topics Dropdown plugin displays a nested sidebar with multiple levels of items. This allows you to organize your documentation essentially on four levels:
- Topics: Representing the main sections of your documentation.
- Sidebar Groups: Representing the sub-sections of a topic.
- Sidebar Items / Pages: Representing the individual pages of a sidebar group.
- Table of Contents: Representing the headings of a page.
However, sometimes you don’t need so many levels of nesting and want to display a single-level sidebar with all items directly under the topic. This plugin makes this possible by providing the option to configure an unnested sidebar, which will result in only three levels of organization:
- Topics: Representing the main sections of your documentation.
- Sidebar Items / Pages: Representing the individual pages of a topic.
- Table of Contents: Representing the headings of a page.
In other words, there are no groups in the sidebar, only the items of a topic are displayed directly under the topic.
Configure an unnested sidebar
To configure an unnested sidebar, set the label
option of the items
array to ""
for all sidebar groups in the topic configuration where you want to display a single-level sidebar.
Here is an example of this feature:
You can see how the sidebar is displayed in the Unnested Sidebar topic.