File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -113,25 +113,30 @@ def builder_inited(app):
113113 app .add_js_file (embed_url )
114114
115115
116+ def copy_file (src , dst ):
117+ if not (dst / src .name ).exists ():
118+ copy_asset (str (src ), str (dst ))
119+
120+
116121def build_finished (app , env ):
117122 if app .builder .format != "html" :
118123 return
119124
120125 module_dir = Path (__file__ ).parent
121- outdir = Path (app .outdir )
126+ static = Path (app .outdir ) / "_static"
122127
123128 # Copy stylesheet
124- src = module_dir / "css"
125- dst = outdir / "_static"
126- copy_asset (src , dst )
129+ src = module_dir / "css" / "jupyter-sphinx.css"
130+ copy_file (src , static )
127131
128132 thebe_config = app .config .jupyter_sphinx_thebelab_config
129133 if not thebe_config :
130134 return
131135
132136 # Copy all thebelab related assets
133- src = module_dir / "thebelab"
134- copy_asset (src , dst )
137+ src_dir = module_dir / "thebelab"
138+ for fname in ["thebelab-helper.js" , "thebelab.css" ]:
139+ copy_file (src_dir / fname , static )
135140
136141
137142##############################################################################
You can’t perform that action at this time.
0 commit comments