From 332324c80d366cf1ae3f4b11ed888d3e1e174e1b Mon Sep 17 00:00:00 2001 From: Elan Ernest <23121882+ImportanceOfBeingErnest@users.noreply.github.com> Date: Mon, 15 Oct 2018 07:58:44 +0200 Subject: [PATCH] Backport PR #12216: Doc: Fix search for sphinx >=1.8 --- doc/_templates/layout.html | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index e95ec1fdf110..b756e2fa76f0 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -76,19 +76,27 @@

{{ _('Navigation') }}

{%- endmacro %} {%- macro script() %} - - {%- for scriptfile in script_files %} - - {%- endfor %} + {% if sphinx_version >= "1.8.0" %} + + {%- for scriptfile in script_files %} + {{ js_tag(scriptfile) }} + {%- endfor %} + {% else %} + + {%- for scriptfile in script_files %} + + {%- endfor %} + {% endif %} {%- endmacro %} {%- macro css() %}