Skip to content

Commit

Permalink
doc: Ensure searchtools.js gets included
Browse files Browse the repository at this point in the history
Searchtools did not get included with Debian > stretch and
Sphinx > 1.6.7.

Sphinx 3.4.0 also needs `language_data.js` to properly search.
See readthedocs/sphinx_rtd_theme#1021

`searchtools.js` and `language_data.js` are only needed by
`search.html`. So maybe better just add `search.html` to the template.

Forwarded: no
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
Gbp-Pq: Name ensure-searchtools.js-gets-included.patch
  • Loading branch information
Steffen Kockel authored and bdrung committed Nov 30, 2022
1 parent 09c2472 commit ce70e3a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/_themes/saltstack/layout.html
Expand Up @@ -27,6 +27,12 @@
{% set script_files = [
'_static/js/vendor/bootstrap.min.js',
] + script_files %}
{%- if not '_static/searchtools.js' in script_files %}
{%- set script_files = script_files + ['_static/searchtools.js'] %}
{%- endif %}
{%- if not '_static/language_data.js' in script_files %}
{%- set script_files = script_files + ['_static/language_data.js'] %}
{%- endif %}

{%- macro relbar() %}
<div class="related">
Expand Down

0 comments on commit ce70e3a

Please sign in to comment.