Skip to content

Commit

Permalink
generate thumbnail for tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
fehiepsi committed Mar 28, 2024
1 parent 406e625 commit 379caa9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
docs/notebooks
docs/examples
docs/getting_started.rst
docs/sg_execution_times.rst
venv/

# Compiled python modules.
*.pyc
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ help:
%: Makefile
git clean -dfx build
git clean -dfx examples
git clean -dfx tutorials
git clean -dfx notebooks
git clean -f getting_started.rst
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
git clean -dfx examples
git clean -dfx tutorials
git clean -dfx notebooks
git clean -f getting_started.rst
Binary file added docs/_static/tutorial_part1_vae.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/tutorial_part2_api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/tutorial_part3_smcs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@
):
toctree_path = "notebooks/" if src_file.endswith("ipynb") else "examples/"
filename = os.path.splitext(src_file.split("/")[-1])[0]
png_path = "_static/img/" + toctree_path + filename + ".png"
png_path = "_static/" + filename + ".png"
# use Coix logo if not exist png file
if not os.path.exists(png_path):
png_path = "_static/img/coix_logo_wide.png"
png_path = "_static/coix_logo.png"
nbsphinx_thumbnails[toctree_path + filename] = png_path


Expand All @@ -237,7 +237,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ["_static"]
html_static_path = ["_static"]
# html_style = "css/coix.css"

# Custom sidebar templates, must be a dictionary that maps document names
Expand Down

0 comments on commit 379caa9

Please sign in to comment.