-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move language-specific data into a new JS file, language_data.js #5590
Conversation
This file is included in script_files, so it will be present even for projects using custom templates. Fixes sphinx-doc#5460.
Codecov Report
@@ Coverage Diff @@
## 1.8 #5590 +/- ##
==========================================
+ Coverage 82.05% 82.06% +<.01%
==========================================
Files 306 306
Lines 40390 40391 +1
Branches 6241 6241
==========================================
+ Hits 33144 33145 +1
Misses 5862 5862
Partials 1384 1384
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good and can confirm it fixes the issue with the ReadTheDocs template. Still, I wonder if it makes more sense to include documentation_options.js_t
via self.add_js_file()
and to fix everything in documentation_options.js_t
. What do you think, @tk0miya?
@TimKam it is difficult to load it via |
Thanks for clarifying. Then I think there is no trivial way to improve this. I'm fine with this PR :-) |
+1. I just released 1.8.2 without merging this because of overlooking. So I'm merging this for 1.8.3. |
Subject: Make search work with old templates
Feature or Bugfix
Bugfix
Purpose
Not all templates use
documentation_options.js
. The examples are old versions of sphinx-rtd-theme and many other third-party themes. However currently searchtools.js does not work without some classes, which are defined indocumentation_options.js
. This pull request moves these classes to a separate filelanguage_data.js
which is always included, even for old templates.Relates
Fixes #5460.