summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-08 14:17:43 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-02-08 14:17:43 (GMT)
commit787c5f37dde5982dea71b34339b9f546907bb368 (patch)
tree9f41a63ff33583797d88f8e62330ce84d5cda629
parent7e42a43c1413e46e43d657a025dae726735dfcda (diff)
parent82e5ab9e14b81e0d21ef61f503a2b4c8638776e8 (diff)
downloadCMake-787c5f37dde5982dea71b34339b9f546907bb368.zip
CMake-787c5f37dde5982dea71b34339b9f546907bb368.tar.gz
CMake-787c5f37dde5982dea71b34339b9f546907bb368.tar.bz2
Merge topic 'doc-cmake.org-version-switch'
82e5ab9e Utilities/Sphinx: Add option for cmake.org version switch to html
-rw-r--r--Utilities/Sphinx/templates/layout.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/Utilities/Sphinx/templates/layout.html b/Utilities/Sphinx/templates/layout.html
index 177e044..be2660c 100644
--- a/Utilities/Sphinx/templates/layout.html
+++ b/Utilities/Sphinx/templates/layout.html
@@ -8,10 +8,22 @@
<a href="https://cmake.org/">CMake</a>{{ reldelim1 }}
</li>
<li>
+ {%- if versionswitch is defined %}
+ <span class="version_switch">{{ release }}</span>
+ <a href="{{ pathto(master_doc) }}">{% trans %}Documentation{% endtrans %}</a>{{ reldelim1 }}
+ {%- else %}
<a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}
+ {%- endif %}
</li>
{% endblock %}
+{% block extrahead %}
+ {% if versionswitch is defined %}
+ <script type="text/javascript" src="{{ pathto('../version_switch.js', 1) }}"></script>
+ {% endif %}
+{{ super() }}
+{% endblock %}
+
{# Put some context in the html title element. Workaround for #}
{# https://bitbucket.org/birkenfeld/sphinx/issue/1492/qthelp-generate-html-title-element-should #}
{% block htmltitle %}