Skip to content

Commit 26e9973

Browse files
authored
update left sidebar to persist resources (#636)
# Description During the past few docs meetings and community meetings, we have been talking about ways to provide users information about using napari and engaging them in the napari community. One idea that kept coming up was how to provide users easy access to troubleshooting information and release notes. After a recent docs meeting, @TimMonko came up with the idea to put a few frequently used links in the left sidebar. He made a PR that would add the links to the sidebar on the homepage. Someone else commented that it would be nice to have the links on other pages. I had played around with the napari sphinx theme and its templates a couple of months ago. I had the idea to update the left sidebar's jinja template to include a persistent section of frequently used links. Here's a before and after view: ![Screenshot 2025-03-20 at 8 37 42 AM](https://github.com/user-attachments/assets/3b2b8568-9298-43af-bbe4-27f4badf0342) ![Screenshot 2025-03-20 at 8 46 27 AM](https://github.com/user-attachments/assets/65ac1e6f-0b17-4184-a862-ef2b8b574259)
1 parent 07d42cf commit 26e9973

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

docs/_templates/sidebar-nav-bs.html

+29-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #}
22
<nav class="bd-docs-nav bd-links" aria-label="{{ _('Section Navigation') }}">
3+
<p class="caption" role="heading" aria-level="1">
4+
<span class="caption-text">Section Navigation</span>
5+
</p>
36
<div class="bd-toc-item navbar-nav">
47
{{- generate_toctree_html(
58
"sidebar",
@@ -9,6 +12,31 @@
912
includehidden=theme_sidebar_includehidden | tobool,
1013
titles_only=True
1114
)
15+
1216
-}}
17+
<p class="caption" role="heading" aria-level="2">
18+
<span class="caption-text">Resources</span>
19+
</p>
20+
<ul class="nav bd-sidenav">
21+
<li class="toctree-l1">
22+
<a class="reference internal" href="community/meeting_schedule.html">Community calendar</a>
23+
</li>
24+
<li class="toctree-l1">
25+
<a class="reference external" href="https://napari.zulipchat.com/">Community chat</a>
26+
</li>
27+
<li class="toctree-l1">
28+
<a class="reference internal" href="troubleshooting.html">Troubleshooting</a>
29+
</li>
30+
<li class="toctree-l1">
31+
{% if version == "dev" %}
32+
<a class="reference internal" href="{{ 'release/index.html' }}">Release notes</a>
33+
{% else %}
34+
<a class="reference internal" href="{{ 'release/release_' + version.replace('.', '_') + '.html' }}">Latest release notes</a>
35+
{% endif %}
36+
</li>
37+
<li class="toctree-l1">
38+
<a class="reference external" href="https://napari.org/island-dispatch">Blog</a>
39+
</li>
40+
</ul>
1341
</div>
14-
</nav>
42+
</nav>

0 commit comments

Comments
 (0)