Skip to content

chore: take theme v3.0.0, migrating the launch and footer config - #629

Merged
mmcky merged 1 commit into
jb2from
chore/theme-v3.0.0
Sep 12, 2026
Merged

chore: take theme v3.0.0, migrating the launch and footer config#629
mmcky merged 1 commit into
jb2from
chore/theme-v3.0.0

Conversation

@mmcky

@mmcky mmcky commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

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:

Sphinx → MyST site.options
nb_repository_url: …/lecture-python-programming.notebooks launch_notebook_repo: QuantEcon/lecture-python-programming.notebooks
path_to_docs: lectures launch_notebook_source_dir: lectures
launch_buttons.colab_url present launch_colab: true
no nb_branch omitted — main is the theme's default
no nb_path_to_notebooks omitted

The 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.github is 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.footer and lectures/footer.md are 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.md had 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.png is removed with it — the badge is an inline SVG in the theme now, and nothing else in the repo referenced that image.

site_url

Set to https://python-programming.quantecon.org/, carried over from the Sphinx build's html.baseurl. The theme emits a canonical link and og:url only when it is set, and neither existed on the MyST build before.

Source changes

need_for_speed.md and polars.md were rewritten by the theme repo's scripts/rewrite-raw-blocks.mjs, shipped in v3.0.0 for this migration. It deletes the {raw} jupyter header 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

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>
Copilot AI lite review requested due to automatic review settings September 12, 2026 04:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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} jupyter notebook-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.

@github-actions

Copy link
Copy Markdown

@mmcky
mmcky merged commit 69ce7e5 into jb2 Sep 12, 2026
3 checks passed
@mmcky
mmcky deleted the chore/theme-v3.0.0 branch September 12, 2026 05:08
@mmcky

mmcky commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (zh-cn)

Target repo: QuantEcon/lecture-python-programming.zh-cn
Translation PR: QuantEcon/lecture-python-programming.zh-cn#105
Files synced (2):

  • lectures/need_for_speed.md
  • lectures/polars.md

@mmcky

mmcky commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (fa)

Target repo: QuantEcon/lecture-python-programming.fa
Translation PR: QuantEcon/lecture-python-programming.fa#166
Files synced (2):

  • lectures/need_for_speed.md
  • lectures/polars.md

@mmcky

mmcky commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (fr)

Target repo: QuantEcon/lecture-python-programming.fr
Translation PR: QuantEcon/lecture-python-programming.fr#79
Files synced (2):

  • lectures/need_for_speed.md
  • lectures/polars.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants