docs: Add version sidebar

This commit is contained in:
Jan Holthuis 2020-03-11 16:04:45 +01:00
parent 8d36aebb61
commit afad67376e
2 changed files with 30 additions and 0 deletions

14
docs/_templates/versioning.html vendored Normal file
View file

@ -0,0 +1,14 @@
{% if versions %}
<h3>{{ _('Branches') }}</h3>
<ul>
{%- for item in versions.branches %}
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
{%- endfor %}
</ul>
<h3>{{ _('Tags') }}</h3>
<ul>
{%- for item in versions.tags %}
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
{%- endfor %}
</ul>
{% endif %}

View file

@ -15,3 +15,19 @@ templates_path = ["_templates"]
extensions = [
"sphinx_multiversion",
]
templates_path = [
"_templates",
]
html_sidebars = {
"**": [
"about.html",
"navigation.html",
"relations.html",
"searchbox.html",
"versioning.html",
],
}
mv_remote_whitelist = r"^origin$"