Skip to content

Commit

Permalink
Docs: add link to versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbozzolo committed Mar 28, 2023
1 parent b64a2ea commit 1022217
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,5 @@ When releasing a new version, these are the steps:
- Update the dependencies with `poetry update`.
- Run the tests.
- Tag a release.
- Add a new version to the `versions` variable in `docs/conf.py`.
- Clean up the release notes on `GitHub`.
12 changes: 12 additions & 0 deletions docs/_templates/versions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div role="note" aria-label="version link">
<h3>Versions</h3>
<ul class="this-page-menu">
<li><a href="{{ pathto('dev/' + pagename + file_suffix, true)|e }}" rel="nofollow"> {{ _('Development') }} </a></li>
<li><a href="{{ pathto(pagename + file_suffix, true)|e }}" rel="nofollow"> {{ _('Master') }} </a></li>

{% for version in versions %}
<li><a href="{{ pathto(version + '/' + pagename + file_suffix, true)|e }}" rel="nofollow"> {{ _(version) }} </a></li>
{% endfor %}

</ul>
</div>
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@

html_show_sourcelink = False

html_sidebars = {
'**': ['localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html', 'versions.html'],
}

html_context = {'versions': ['1.3.6']}

html_theme_options = {
"maincolor": "#228B22",
}
Expand Down

0 comments on commit 1022217

Please sign in to comment.