From a79f6119eba0677a0b00e3a90a6182e2443d89a5 Mon Sep 17 00:00:00 2001 From: ix5 Date: Thu, 24 Mar 2022 10:38:08 +0100 Subject: [PATCH] docs: _isso theme: Simplify js macros, fix search A few things got refactored in sphinx, especially for 4.x. Therefore, use provided helpers. As a reference for the future, always look at what the "basic" sphinx theme (bundled as `sphinx/themes/basic`) does. See: - https://github.com/sphinx-doc/sphinx/commit/a957d6f710 - https://github.com/sphinx-doc/sphinx/pull/4916 - https://github.com/sphinx-doc/sphinx/issues/4915 - https://github.com/readthedocs/sphinx_rtd_theme/pull/1021 --- docs/_isso/layout.html | 18 ++---------------- docs/_isso/search.html | 2 +- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/docs/_isso/layout.html b/docs/_isso/layout.html index c0f947689..668198079 100644 --- a/docs/_isso/layout.html +++ b/docs/_isso/layout.html @@ -1,26 +1,12 @@ -{%- set url_root = pathto('', 1) %} -{# XXX necessary? #} -{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} {%- macro script() %} - - {%- for scriptfile in script_files %} - + {%- for js in script_files %} + {{ js_tag(js) }} {%- endfor %} {%- endmacro %} {%- macro css() %} - {%- for cssfile in css_files %} diff --git a/docs/_isso/search.html b/docs/_isso/search.html index 1cd9cc8eb..86165039c 100644 --- a/docs/_isso/search.html +++ b/docs/_isso/search.html @@ -5,7 +5,7 @@

Search

{% endblock %} {% set title = _('Search') %} -{% set script_files = script_files + ['_static/searchtools.js'] %} +{% set script_files = script_files + ['_static/searchtools.js'] + ['_static/language_data.js'] %} {% block extrahead %}