Skip to content

Commit 99e10de

Browse files
timsaucerclaude
andcommitted
docs: address Copilot review feedback on sidebar config
Two small follow-ups from the Copilot reviewer on #1578: - Append .html to the html_sidebars entry. Sphinx's Jinja loader resolves both "sidebar-globaltoc" and "sidebar-globaltoc.html" to the same template, but the explicit form is closer to the spelling in the Sphinx docs and is harder to misread. - Update the inline comment in sidebar-globaltoc.html that still claimed show_nav_level=1 after we bumped it to 2 in conf.py. Now describes the variable wiring instead of hard-coding a number that has to be kept in sync with conf.py. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9e933fc commit 99e10de

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

docs/source/_templates/sidebar-globaltoc.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
<div class="bd-toc-item navbar-nav">
1414
{# collapse=False so nested <ul>s render into the DOM for every
1515
branch; the theme's JS then adds the expand/collapse chevrons
16-
on top. show_nav_level=1 keeps deeper levels collapsed by
17-
default so the landing-page sidebar isn't a wall of links. #}
16+
on top. show_nav_level is driven by theme_show_nav_level (set
17+
in conf.py) so callers can adjust how deep the sidebar opens
18+
by default without editing this template. #}
1819
{{- generate_toctree_html(
1920
"sidebar",
2021
startdepth=0,

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def setup(sphinx) -> None:
165165
html_css_files = ["theme_overrides.css"]
166166

167167
html_sidebars = {
168-
"**": ["sidebar-globaltoc"],
168+
"**": ["sidebar-globaltoc.html"],
169169
}
170170

171171
# tell myst_parser to auto-generate anchor links for headers h1, h2, h3

0 commit comments

Comments
 (0)