@@ -136,28 +136,17 @@ def get_holoviews_js_css():
136
136
from holoviews .plotting import Renderer
137
137
dependencies = {** Renderer .core_dependencies ,
138
138
** Renderer .extra_dependencies }
139
- required = ['jQuery' , 'jQueryUI' , ' underscore' , 'require' ]
139
+ required = ['jQueryUI' ] # require, jQuery, and underscore are added by sphinx
140
140
js = [url for name in required for url in dependencies [name ].get ('js' , [])]
141
141
css = [url for name in required for url in dependencies [name ].get ('css' , [])]
142
142
return js , css
143
143
144
144
145
145
js , css = get_holoviews_js_css ()
146
- html_context = {'holoviews_js_files' : js }
147
-
148
-
149
- def remove_jquery_and_underscore (app ):
150
- # We need to remove the jquery and underscore file that are
151
- # added by default because we already add it in the <head> tag.
152
- remove = lambda x : not any (js in x for js in ['jquery' , 'underscore' ])
153
- if hasattr (app .builder , 'script_files' ):
154
- app .builder .script_files = [x for x in app .builder .script_files
155
- if remove (x )]
146
+ html_context = {'holoviews_js_files' : js } # used in source/_templates/layout.html
156
147
157
148
158
149
def setup (app ):
159
150
for url in css :
160
151
app .add_stylesheet (url )
161
-
162
152
app .add_stylesheet ('custom.css' ) # For the `live_info` widget
163
- app .connect ('builder-inited' , remove_jquery_and_underscore )
0 commit comments