Skip to content

Commit 633e14e

Browse files
committed
fix doc build
1 parent 5685251 commit 633e14e

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

docs/conf.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
from tesseract_jax import __version__
1414

15+
here = Path(__file__).parent.resolve()
16+
1517
project = "Tesseract-JAX"
1618
copyright = "2025, Pasteur Labs"
1719
author = "The Tesseract-JAX Team @ Pasteur Labs + OSS contributors"
@@ -78,8 +80,9 @@
7880
# Do not execute notebooks during build (just take existing output)
7981
nb_execution_mode = "off"
8082

81-
# Copy example notebooks to demo_notebooks folder on every build
82-
for example_notebook in Path("../examples").glob("*/demo.ipynb"):
83-
# Copy the example notebook to the docs folder
84-
dest = (Path("demo_notebooks") / example_notebook.parent.name).with_suffix(".ipynb")
85-
shutil.copyfile(example_notebook, dest)
83+
# Copy example notebooks to docs/examples folder on every build
84+
for example_dir in Path("../examples").glob("*/"):
85+
# Copy the example directory to the docs folder
86+
shutil.copytree(
87+
example_dir, here / "examples" / example_dir.name, dirs_exist_ok=True
88+
)

docs/demo_notebooks/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/examples/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/*
2+
!.gitignore

docs/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def vector_sum(x, y):
1313
jax.grad(vector_sum)(x, y) # 🎉
1414
```
1515

16-
Want to learn more? See how to [get started](content/get-started.md) with Tesseract-JAX, explore the [API reference](content/api.md), or learn by [example](demo_notebooks/simple.ipynb).
16+
Want to learn more? See how to [get started](content/get-started.md) with Tesseract-JAX, explore the [API reference](content/api.md), or learn by [example](examples/simple/demo.ipynb).
1717

1818
## License
1919

@@ -36,8 +36,9 @@ content/api
3636
:maxdepth: 2
3737
:hidden:
3838
39-
demo_notebooks/simple.ipynb
40-
demo_notebooks/cfd.ipynb
39+
examples/simple/demo.ipynb
40+
examples/cfd/demo.ipynb
41+
examples/fem-shapeopt/demo.ipynb
4142
```
4243

4344
```{toctree}

0 commit comments

Comments
 (0)