Repository navigation
site-build: build the notebooks of a site that publishes them, and serve them at _notebooks/ - #104
Conversation
…rve them at _notebooks/ A site whose site.yml publishes notebooks now gets them, as its series' own publish does: the jupyter builder, strict, and the notebooks under _build/html/_notebooks/, where quantecon-book-theme links each page's "Download Notebook" button. dp's live site has done so since QuantEcon/lecture-dp#87, and the notebooks belong in a release from the pool (QuantEcon/project-monorepo#78). The order differs from the series': the theme shows the button when _build/html/_notebooks/ is a folder as it renders a page, so the folder is made before the HTML build, and the notebooks are built after it and copied in. The HTML build stays the one that executes the pages, which the execution report counts and the cache save depends on; the notebook build runs after the report (it rewrites the environment the report reads), from the cache the HTML build filled. - site-build.yml: the folder, the jupyter build (its own failure artefact, execution-reports-<key>-notebooks) and the copy, each only for a site that publishes notebooks; the leg's steps in the header. - sites/README.md: what `publishes` now does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
The buildsSite-build 45813283589 at
The pages without the link are each site's dp's links go to dp's notebooks against lecture-dp#87's own build (QuantEcon/lecture-dp 45712899886, also 53): the same names but two.
The execution report ran before the notebook build, as intended. On a cold build, it counts the pages the HTML build executed, and main saves its cache as before. |
For QuantEcon/project-monorepo#77 ("with HTML, PDF and notebooks"): the notebooks. A site whose
site.ymlpublishes notebooks now gets them, as its series' own publish does: thejupyterbuilder, strict, with the notebooks served at_build/html/_notebooks/, where quantecon-book-theme links each page's "Download Notebook" button. All four sites built today publish notebooks: dp since QuantEcon/lecture-dp#87, and intro, advanced and programming throughout. A release from the pool (#103) needs them, as does dp's shadow comparison.The order, and why it differs from the series'
The series build the notebooks first, then the HTML with
html-copy-notebooks. Here that order would break the cache. On a cold build the notebook build would execute every page, the HTML build would then take every page from the cache, and the execution report, which reads the HTML build, would count 0 executed, so main would never save its cache.The theme shows the button when
_build/html/_notebooks/is a folder as it renders a page (os.path.isdir(app.outdir / "_notebooks"), quantecon-book-theme 0.22.2). So:_build/jupyterinto_build/html/_notebooks/at the same path, as build-lectures'html-copy-notebooksdoes.The site gets the same files and the same buttons as the series' order would give it.
Each new step runs only for a site that publishes notebooks. The notebook build has its own failure artefact,
execution-reports-<key>-notebooks.What to expect from this pull request's builds
The keys don't change, so every site restores its cache, and the notebook build takes every page from it. Each site's HTML gains the button and
_notebooks/. I'll compare the result with the series' own sites (dp's 52 notebooks, as in QuantEcon/lecture-dp#87's comparison) and post it here.actionlint is clean. Copilot: not requested (Matt, 2026-11-22).
🤖 Generated with Claude Code
https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG