mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #8419: html search: Do not load language_data.js in non-search pages
The ``language_data.js`` is only used on search page. But it is always loaded meaninglessly. This fixes not to load it on all non-search pages.
This commit is contained in:
parent
68c91b1920
commit
d0389dce07
1
CHANGES
1
CHANGES
@ -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
|
||||
--------
|
||||
|
@ -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)
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user