Commit 3c8b530
docs: render sidebar nav on landing page
The default pydata-sphinx-theme sidebar-nav-bs starts at the current
top-level section, so the root index — which has no parent section —
ends up with an empty sidebar. The theme's layout also explicitly
filters sidebar-nav-bs out of the sidebar list when suppress_sidebar_
toctree() returns true (which it does for root pages), so simply
overriding sidebar-nav-bs.html in templates doesn't help.
Add a sidebar-globaltoc.html template that calls Sphinx's toctree()
global directly to render the full document tree, and wire it through
html_sidebars under a name the theme's suppress filter doesn't strip.
Landing page now shows User Guide / Contributor Guide / API Reference
in the sidebar with the current section expanded on inner pages.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 41030ef commit 3c8b530
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
| |||
0 commit comments