chore: take theme v3.0.0, migrating the launch and footer config - #629
Conversation
v3.0.0 is a breaking release for this repo's config: the five `launch_*`
options are replaced, and a site that bumps the pinned theme without
editing `myst.yml` silently loses its Launch control.
The launch values are ported from the Sphinx build rather than invented --
`nb_repository_url` becomes `launch_notebook_repo` and `path_to_docs`
becomes `launch_notebook_source_dir`, with `launch_colab: true` standing in
for the `launch_buttons.colab_url` entry. The branch is left unset because
`main` is the default. Nothing is derived from `project.github` any more,
so the comment above it that said otherwise is corrected.
`site.parts.footer` and `lectures/footer.md` are removed: the theme renders
the licence notice by default from v3.0.0, and declaring a footer part
replaces that whole block. The default is a superset of what the file had
-- it adds the "A theme by QuantEcon" credit the Sphinx sites carried, which
footer.md had dropped. `lectures/_static/ccbysa.png` goes with it, since the
badge is now an inline SVG in the theme and nothing else referenced it.
`site_url` comes from the Sphinx build's `html.baseurl` and is what makes
the theme emit a canonical link and `og:url`.
`need_for_speed.md` and `polars.md` lose their `{raw} jupyter`
notebook-header blocks, rewritten out by the theme repo's
`scripts/rewrite-raw-blocks.mjs`: mystmd renders no `raw` node, so each
block's own source was reaching readers as escaped text under the page
title.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The changes align with the theme v3.0.0 migration requirements (Launch options, site_url, and default footer) and no broken in-repo references to the removed footer assets/config were found.
Pull request overview
Updates the lecture site’s MyST configuration to adopt QuantEcon’s MyST theme v3.0.0 (a breaking release) and migrates related site settings (Launch controls, canonical/OG URL behavior, and footer handling) to the new theme expectations.
Changes:
- Bump the pinned QuantEcon MyST theme to v3.0.0 and migrate Launch configuration into
site.options. - Remove custom footer part/content so the theme’s default licence + credit footer is used.
- Remove legacy
{raw} jupyternotebook-header blocks from two lecture sources.
File summaries
| File | Description |
|---|---|
| lectures/myst.yml | Pins theme v3.0.0 and configures site_url + Launch options; removes custom footer part. |
| lectures/polars.md | Removes legacy {raw} jupyter notebook header HTML block. |
| lectures/need_for_speed.md | Removes legacy {raw} jupyter notebook header HTML block. |
| lectures/footer.md | Deletes custom footer content so the theme’s default footer is used. |
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-python-programming.zh-cn
|
✅ Translation sync completed (fa)Target repo: QuantEcon/lecture-python-programming.fa
|
✅ Translation sync completed (fr)Target repo: QuantEcon/lecture-python-programming.fr
|
Takes theme v3.0.0, the release that closes the book-theme parity gate. This is the breaking one — v3.0.0 replaces the five
launch_*options, so bumping the pinned theme without these config changes would silently drop the Launch control.Launch options, ported from the Sphinx config rather than invented
Read out of
lectures/_config.yml, so the MyST build launches the same notebooks the Sphinx build does:site.optionsnb_repository_url: …/lecture-python-programming.notebookslaunch_notebook_repo: QuantEcon/lecture-python-programming.notebookspath_to_docs: lectureslaunch_notebook_source_dir: lectureslaunch_buttons.colab_urlpresentlaunch_colab: truenb_branchmainis the theme's defaultnb_path_to_notebooksThe companion repository was confirmed to exist before naming it, since the whole point of the v3.0.0 change is that a named-but-missing repo is what used to put a dead link on every page.
The comment above
project.githubis corrected too: it said the theme derives the launch repo from that value, which is no longer true.The footer is now the theme's
site.parts.footerandlectures/footer.mdare removed. From v3.0.0 the theme renders the CC BY-SA notice by default, and declaring a footer part replaces that whole default, so keeping the file would override what it is meant to provide.Worth noting the default is a superset of what the file carried:
footer.mdhad the badge and the licence sentence but no credit line, and the theme's default restores the "A theme by QuantEcon" credit the Sphinx sites showed.lectures/_static/ccbysa.pngis removed with it — the badge is an inline SVG in the theme now, and nothing else in the repo referenced that image.site_urlSet to
https://python-programming.quantecon.org/, carried over from the Sphinx build'shtml.baseurl. The theme emits a canonical link andog:urlonly when it is set, and neither existed on the MyST build before.Source changes
need_for_speed.mdandpolars.mdwere rewritten by the theme repo'sscripts/rewrite-raw-blocks.mjs, shipped in v3.0.0 for this migration. It deletes the{raw} jupyterheader block and nothing else, and exits non-zero writing nothing if it meets a{raw}block it does not recognise — it met none. Those two were the only files in the repo carrying one.🤖 Generated with Claude Code