Skip to content

Commit ea6f59e

Browse files
committed
Wrap the versions menu under a conditional
The default (``versions_menu`` not defined) won't show the menu --the case under readthedocs.com/.org Under development, we can define the ``versions_menu`` under ``html_context`` to render the static menu as it was the default previously.
1 parent 6d0136f commit ea6f59e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sphinx_rtd_theme/versions.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<span class="fa fa-caret-down"></span>
88
</span>
99
<div class="rst-other-versions">
10+
{% if versions_menu %}
1011
<dl>
1112
<dt>{{ _('Versions') }}</dt>
1213
{% for slug, url in versions %}
@@ -30,7 +31,9 @@
3031
</dl>
3132
<hr/>
3233
{% trans %}Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.{% endtrans %}
33-
34+
{% else %}
35+
{# This content is injected by an AJAX call to readthedocs.org/readthedocs.com #}
36+
{% endif %}
3437
</div>
3538
</div>
3639
{% endif %}

0 commit comments

Comments
 (0)