Skip to content

Commit b760f40

Browse files
authored
Merge pull request #152 from akhmerov/issue-149
inject js and css during extension setup
2 parents 60758ea + a9f542a commit b760f40

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

jupyter_sphinx/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ def builder_inited(app):
110110
if embed_url:
111111
app.add_js_file(embed_url)
112112

113-
# add jupyter-sphinx css
114-
app.add_css_file("jupyter-sphinx.css")
115-
# Check if a thebelab config was specified
116-
if app.config.jupyter_sphinx_thebelab_config:
117-
app.add_js_file("thebelab-helper.js")
118-
app.add_css_file("thebelab.css")
119-
120113

121114
def build_finished(app, env):
122115
if app.builder.format != "html":
@@ -288,4 +281,9 @@ def setup(app):
288281
app.connect("builder-inited", builder_inited)
289282
app.connect("build-finished", build_finished)
290283

284+
# add jupyter-sphinx and thebelab js and css
285+
app.add_css_file("jupyter-sphinx.css")
286+
app.add_js_file("thebelab-helper.js")
287+
app.add_css_file("thebelab.css")
288+
291289
return {"version": __version__, "parallel_read_safe": True}

0 commit comments

Comments
 (0)