-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
prevent jQuery from being loaded twice #4787
Comments
Maybe related to #3063 and #4367 (comment) |
I fixed this issue using this commit python-adaptive/adaptive@6cdd24e. Basically I added this code to my def remove_jquery_and_underscore(app):
# We need to remove the jquery and underscore file that are
# added by default because we already add it in the <head> tag.
remove = lambda x: not any(js in x for js in ['jquery', 'underscore'])
if hasattr(app.builder, 'script_files'):
app.builder.script_files = [x for x in app.builder.script_files
if remove(x)]
def setup(app):
app.connect('builder-inited', remove_jquery_and_underscore) |
This was referenced Oct 22, 2018
This above solution fixed our problem, but I really consider it a hack. The proper solution is in readthedocs/sphinx_rtd_theme#545. I will close this issue now. @stsewd thanks for the prompt reply! 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details
Expected Result
We have to load jQuery in the
<head>
(to show interactive plots) which is what we do by having this in ourconf.py
, a customlayout.html
, and an empty_static/jquery.js
file that gets loaded at the bottom by default (to prevent loading jquery a second time).Actual Result
We overwrite the default
jquery.js
, which works in local builds. However, on readthedocs it uses anotherjquery
file.Html of our locally build docs:
Readthedocs source
html
:Because of this
ipywidgets
are not displayed on adaptive.readthedocs.io.How can I change this behavior?
Related: qt/adaptive/issues/118
The text was updated successfully, but these errors were encountered: