Skip to content

Commit

Permalink
Fix examples figures
Browse files Browse the repository at this point in the history
  • Loading branch information
EltonCN committed Nov 26, 2024
1 parent 1d4b893 commit 6c264a6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,16 @@ def all_but_ipynb(dir, contents):

shutil.copyfile(os.path.join(project_root, "README.md"), os.path.join(project_root, "docs/README.md"))
shutil.copyfile(os.path.join(project_root,"examples", "README.md"), os.path.join(project_root, "docs/Examples.md"))

#Copy examples images
shutil.rmtree("_build/html/_examples/_examples", ignore_errors=True )
def ignore_ipynb(dir, contents):
result = []
for c in contents:
if os.path.isfile(os.path.join(dir,c)) and c.endswith(".ipynb"):
result += [c]
return result

shutil.copytree(os.path.join(project_root, "docs", "_examples"),
os.path.join(project_root, "docs", "_build", "html", "_examples", "_examples"),
ignore=ignore_ipynb)

0 comments on commit 6c264a6

Please sign in to comment.