File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,6 @@ def process_repo(repo, destination_directory):
6565 f"{ repo } /{ tname } .html" ,
6666 destination_directory ,
6767 )
68- shutil .copytree (
69- f"{ repo } /_static" ,
70- f"{ destination_directory } /_static" ,
71- dirs_exist_ok = True ,
72- )
7368 # if len(tutorials) > 1:
7469 # index_files = glob.glob(f"{repo}/index-*.html")
7570 # if index_files:
@@ -79,6 +74,23 @@ def process_repo(repo, destination_directory):
7974 # else:
8075 # raise FileNotFoundError(f"No index-*.html file found for {repo_name}.")
8176
77+ # copy files for in-notebook search bar
78+ shutil .copy (
79+ f"{ repo } /search.html" ,
80+ destination_directory ,
81+ )
82+ shutil .copy (
83+ f"{ repo } /searchindex.js" ,
84+ destination_directory ,
85+ )
86+
87+ # copy _static files (CSS, JS) for page rendering
88+ shutil .copytree (
89+ f"{ repo } /_static" ,
90+ f"{ destination_directory } /_static" ,
91+ dirs_exist_ok = True ,
92+ )
93+
8294 # copy images (plots) in notebook for faster page loading
8395 images = glob .glob (f"{ repo } /_images/*.png" )
8496 if len (images ) > 0 :
You can’t perform that action at this time.
0 commit comments