Skip to content

Commit afad673

Browse files
committed
docs: Add version sidebar
1 parent 8d36aeb commit afad673

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/_templates/versioning.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% if versions %}
2+
<h3>{{ _('Branches') }}</h3>
3+
<ul>
4+
{%- for item in versions.branches %}
5+
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
6+
{%- endfor %}
7+
</ul>
8+
<h3>{{ _('Tags') }}</h3>
9+
<ul>
10+
{%- for item in versions.tags %}
11+
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
12+
{%- endfor %}
13+
</ul>
14+
{% endif %}

docs/conf.py

+16
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,19 @@
1515
extensions = [
1616
"sphinx_multiversion",
1717
]
18+
19+
templates_path = [
20+
"_templates",
21+
]
22+
23+
html_sidebars = {
24+
"**": [
25+
"about.html",
26+
"navigation.html",
27+
"relations.html",
28+
"searchbox.html",
29+
"versioning.html",
30+
],
31+
}
32+
33+
mv_remote_whitelist = r"^origin$"

0 commit comments

Comments
 (0)