diff options
author | Brad King <brad.king@kitware.com> | 2022-04-02 02:12:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-04-05 20:09:54 (GMT) |
commit | 5c2e8ce515bc1f47ac6dd6d5b55bfe7f45190a02 (patch) | |
tree | 69abe0a6ed823750d0d0214184d22e9f52652ef3 /Utilities/Sphinx | |
parent | a14905d4df6c47dbcd574f05ad0a324906dd1329 (diff) | |
download | CMake-5c2e8ce515bc1f47ac6dd6d5b55bfe7f45190a02.zip CMake-5c2e8ce515bc1f47ac6dd6d5b55bfe7f45190a02.tar.gz CMake-5c2e8ce515bc1f47ac6dd6d5b55bfe7f45190a02.tar.bz2 |
Utilities/Sphinx: Add OpenSearch link to html page headers on cmake.org
Reference an OpenSearch description file that sits outside the content
of any specific version so we only need to maintain one and so that
it can reference the latest version.
This was previously added in a custom branch for building the
cmake.org reference documentation.
Diffstat (limited to 'Utilities/Sphinx')
-rw-r--r-- | Utilities/Sphinx/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Utilities/Sphinx/templates/layout.html | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index dd70ce6..14d0e14 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -139,6 +139,7 @@ set(doc_html_opts "") if(CMake_SPHINX_CMAKE_ORG) list(APPEND doc_html_opts -A googleanalytics=1 + -A opensearch=1 -A versionswitch=1 ) diff --git a/Utilities/Sphinx/templates/layout.html b/Utilities/Sphinx/templates/layout.html index d02b44d..8fb7c42 100644 --- a/Utilities/Sphinx/templates/layout.html +++ b/Utilities/Sphinx/templates/layout.html @@ -31,6 +31,11 @@ {%- endblock %} {% block extrahead %} + {%- if opensearch is defined %} + <link rel="search" type="application/opensearchdescription+xml" + title="Search within CMake Documentation of Latest Version" + href="{{ pathto('../latest-opensearch.xml', 1) }}"/> + {%- endif %} {%- if versionswitch is defined %} <script type="text/javascript" src="{{ pathto('../version_switch.js', 1) }}"></script> {%- endif %} |