Skip to content

Commit 3f04d24

Browse files
authored
Fix empty section navigation sidebar and reorganize templates a bit (#471)
* fix section navigation sidebar The sidebar generation logic in the PyData Sphinx Theme was altered, causing the navigation sidebar to become consistently displayed but always empty. The `sidebar-nav-bs.html` override was initially added to address a responsive design issue, which has now been effectively resolved by the upstream. Let's remove the override to avoid future breakage. `sidebar_includehidden` is set to `False` to get rid of the sidebar when its content is empty. * reposition the project links Add project-related links in a way that does not override upstream templates.
1 parent 645512b commit 3f04d24

File tree

4 files changed

+17
-34
lines changed

4 files changed

+17
-34
lines changed

src/_templates/layout.html

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/_templates/project-links.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{# Displays project-related links. #}
2+
<ul class="nav justify-content-center">
3+
<li class="nav-item">
4+
<a class="nav-link" href="https://github.com/common-workflow-language/user_guide/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a>
5+
</li>
6+
<li class="nav-item">
7+
<a class="nav-link" href="https://github.com/common-workflow-language/user_guide/blob/main/CONTRIBUTING.md">Contributing</a>
8+
</li>
9+
<li class="nav-item">
10+
<a class="nav-link" href="https://github.com/common-workflow-language/user_guide/">Source</a>
11+
</li>
12+
<li class="nav-item">
13+
<a class="nav-link" href="https://github.com/common-workflow-language/user_guide/blob/main/CITATION.md">Cite</a>
14+
</li>
15+
</ul>

src/_templates/sidebar-nav-bs.html

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
# "json_url": json_url,
208208
# "version_match": version_match,
209209
# },
210+
"sidebar_includehidden": False,
210211
"use_edit_page_button": True,
211212
"navbar_align": "content",
212213
"navbar_end": [
@@ -219,6 +220,7 @@
219220
"collapse_navigation": True,
220221
"show_prev_next": True,
221222
"footer_start": ["copyright", "sphinx-version"],
223+
"footer_center": ["project-links"],
222224
"footer_end": ["theme-version"],
223225
}
224226

0 commit comments

Comments
 (0)