Skip to content

Commit

Permalink
Merge pull request #8445 from tk0miya/8419_load_language_data.js_only…
Browse files Browse the repository at this point in the history
…_search_page

Fix #8419: html search: Do not load language_data.js in non-search pages
  • Loading branch information
tk0miya authored Nov 20, 2020
2 parents 68c91b1 + d0389dc commit f5289bb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down
1 change: 0 additions & 1 deletion sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ def init_js_files(self) -> None:
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)
Expand Down
1 change: 1 addition & 0 deletions sphinx/themes/basic/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit f5289bb

Please sign in to comment.