Goal
Improve the sidebar navigation.
Requirements
- Add and configure an appropriate multi-section sidebar plugin for Starlight.
- This should affect only the default Starlight
src/content/docs content, not other collections or ad-hoc pages displayed elsewhere (see below).
- Segment docs by top-level folder with a nav selector.
- Improve sidebar entry styling and default open state.
- Add links to non-docs collections — either offboard the nav switcher to the bottom of the sidebar with an
hr border (preferred), or in the header (backup).
Recommended approach
The requirements map cleanly onto an existing, well-maintained plugin rather than a custom build:
starlight-sidebar-topics (by HiDeoo — same author as the starlight-auto-sidebar already in use, so they compose). Splits docs into "topics", each with its own sidebar, and renders a topic selector above the sidebar links. A topic can also be a plain link (e.g. out to a non-docs collection page) — covering the "links to non-docs collections" requirement directly.
- Want a dropdown switcher specifically?
starlight-sidebar-topics-dropdown is the variant.
- Lighter alternative: Starlight Utils → Multi-Sidebar.
Implementation notes / caveats
- "Segment docs by top-level folder" = one topic per top-level dir (About / Solidarity Primitives / Bread Cooperative). The plugin needs each doc assigned to a topic — this interacts with the current
autogenerate sidebar in astro.config.mjs; expect to migrate the sidebar: config and set a topic per page (frontmatter or config).
- "Improve entry styling & default open state" is split across: the plugin,
_meta.yml collapsed (via starlight-auto-sidebar), and CSS in global.css. The built-in sidebar guide covers collapsed, badge, and groups.
- "Nav switcher at the bottom of the sidebar with an hr" (the preferred option) likely needs a small
Sidebar component override in src/overrides/ — SiteTitle is already overridden, so the pattern exists. See overriding components.
References
Goal
Improve the sidebar navigation.
Requirements
src/content/docscontent, not other collections or ad-hoc pages displayed elsewhere (see below).hrborder (preferred), or in the header (backup).Recommended approach
The requirements map cleanly onto an existing, well-maintained plugin rather than a custom build:
starlight-sidebar-topics(by HiDeoo — same author as thestarlight-auto-sidebaralready in use, so they compose). Splits docs into "topics", each with its own sidebar, and renders a topic selector above the sidebar links. A topic can also be a plain link (e.g. out to a non-docs collection page) — covering the "links to non-docs collections" requirement directly.starlight-sidebar-topics-dropdownis the variant.Implementation notes / caveats
autogeneratesidebar inastro.config.mjs; expect to migrate thesidebar:config and set a topic per page (frontmatter or config)._meta.ymlcollapsed(viastarlight-auto-sidebar), and CSS inglobal.css. The built-in sidebar guide coverscollapsed,badge, and groups.Sidebarcomponent override insrc/overrides/—SiteTitleis already overridden, so the pattern exists. See overriding components.References