diff --git a/examples/sparse_finch.ipynb b/docs/examples/sparse_finch.ipynb similarity index 100% rename from examples/sparse_finch.ipynb rename to docs/examples/sparse_finch.ipynb diff --git a/docs/notebooks.md b/docs/notebooks.md new file mode 100644 index 00000000..e69de29b diff --git a/mkdocs.yml b/mkdocs.yml index 2a5a2c8d..0b476f0b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -52,6 +52,7 @@ plugins: - gen-files: scripts: - scripts/gen_ref_pages.py + - scripts/copy_notebooks.py - literate-nav - mkdocstrings: handlers: @@ -75,6 +76,8 @@ plugins: include_source: true execute: true ignore: ["__init__.py", "utils.py", "gen_logo.py"] + include: + - examples/*.ipynb nav: - Home: @@ -100,3 +103,6 @@ nav: - completed-tasks.md - changelog.md - conduct.md + - Notebooks: + - notebooks.md + - examples/sparse_finch.ipynb diff --git a/scripts/copy_notebooks.py b/scripts/copy_notebooks.py new file mode 100644 index 00000000..837e56a2 --- /dev/null +++ b/scripts/copy_notebooks.py @@ -0,0 +1,10 @@ +import shutil +from pathlib import Path + +source_dir = Path("examples") +dest_dir = Path("docs/examples") + +dest_dir.mkdir(parents=True, exist_ok=True) + +for notebook in source_dir.glob("*.ipynb"): + shutil.copy2(notebook, dest_dir / notebook.name)