Skip to content

Commit 686e2ad

Browse files
committed
Make the versions_menu a theme setting
Added a theme setting to add/remove the versions menu shown a the bottom left side of the screen. By default is `True` to keep backward compatibility.
1 parent ea6f59e commit 686e2ad

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

docs/configuring.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ file of this repository, and can be defined in your project's ``conf.py`` via
2525
'prev_next_buttons_location': 'bottom',
2626
'style_external_links': False,
2727
'vcs_pageview_mode': '',
28+
'versions_menu': True,
2829
# Toc options
2930
'collapse_navigation': False,
3031
'sticky_navigation': True,
@@ -49,6 +50,7 @@ Base options
4950
* ``vcs_pageview_mode`` String. Changes how to view files when using `display_github`, `display_gitlab`, etc.
5051
When using Github or Gitlab this can be: `blob` (default), `edit`, or `raw`,
5152
on Bitbucket, this can be either: `view` (default) or `edit`.
53+
* ``versions_menu`` Bool. Whether or not shows the bottom left menu listing the versions and links to VCS repository.
5254

5355
TOC Options
5456
~~~~~~~~~~~

sphinx_rtd_theme/theme.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ display_version = True
1616
prev_next_buttons_location = bottom
1717
style_external_links = False
1818
vcs_pageview_mode =
19+
versions_menu = True

sphinx_rtd_theme/versions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<span class="fa fa-caret-down"></span>
88
</span>
99
<div class="rst-other-versions">
10-
{% if versions_menu %}
10+
{% if theme_versions_menu %}
1111
<dl>
1212
<dt>{{ _('Versions') }}</dt>
1313
{% for slug, url in versions %}

0 commit comments

Comments
 (0)