diff options
author | Brad King <brad.king@kitware.com> | 2017-02-08 13:13:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-08 13:19:10 (GMT) |
commit | 82e5ab9e14b81e0d21ef61f503a2b4c8638776e8 (patch) | |
tree | 5eeba3740a8f543f43c08145de53e41bc50cc56b /Utilities | |
parent | 9bd017d20ec4a2f9f4ceb2a39aa764b584026026 (diff) | |
download | CMake-82e5ab9e14b81e0d21ef61f503a2b4c8638776e8.zip CMake-82e5ab9e14b81e0d21ef61f503a2b4c8638776e8.tar.gz CMake-82e5ab9e14b81e0d21ef61f503a2b4c8638776e8.tar.bz2 |
Utilities/Sphinx: Add option for cmake.org version switch to html
Leave the option undocumented since it is not for general use. We can
simply pass it through `SPHINX_FLAGS` when building for publication on
`cmake.org`.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/Sphinx/templates/layout.html | 12 |
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 %} |