Merge pull request #8445 from tk0miya/8419_load_language_data.js_only_search_page

Fix #8419: html search: Do not load language_data.js in non-search pages
This commit is contained in:
Takeshi KOMIYA 2020-11-20 22:35:28 +09:00 committed by GitHub
commit f5289bb699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ Bugs fixed
is decorated
* #8434: autodoc: :confval:`autodoc_type_aliases` does not effect to variables
and attributes
* #8419: html search: Do not load ``language_data.js`` in non-search pages
Testing
--------

View File

@ -301,7 +301,6 @@ class StandaloneHTMLBuilder(Builder):
self.add_js_file('jquery.js')
self.add_js_file('underscore.js')
self.add_js_file('doctools.js')
self.add_js_file('language_data.js')
for filename, attrs in self.app.registry.js_files:
self.add_js_file(filename, **attrs)

View File

@ -12,6 +12,7 @@
{%- block scripts %}
{{ super() }}
<script src="{{ pathto('_static/searchtools.js', 1) }}"></script>
<script src="{{ pathto('_static/language_data.js', 1) }}"></script>
{%- endblock %}
{% block extrahead %}
<script src="{{ pathto('searchindex.js', 1) }}" defer></script>