Skip to content

Commit c2b7875

Browse files
mmckyclaude
andcommitted
chore: take theme v3.0.0, migrating the launch and footer config
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>
1 parent 41b1f83 commit c2b7875

5 files changed

Lines changed: 20 additions & 27 deletions

File tree

lectures/_static/ccbysa.png

-17.2 KB
Binary file not shown.

lectures/footer.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

lectures/myst.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ project:
1313
- Instructor for Ph.D. Advanced Macroeconomics, University of Minnesota.
1414
url: https://johnstachurski.net
1515
email: john.stachurski@gmail.com
16-
# The theme derives the notebook-launch repo from this (github + ".notebooks"),
17-
# so it has to be the real repo name.
16+
# Commit and "edit this page" links target this repo. The notebook-launch
17+
# repository is no longer derived from it: from theme v3.0.0 it is named
18+
# explicitly by `launch_notebook_repo` under `site.options`.
1819
github: https://github.com/QuantEcon/lecture-python-programming
1920
# Keep in sync with _toc.yml (the jupyter-book 1.x table of contents).
2021
toc:
@@ -88,9 +89,23 @@ project:
8889
# - id: book-pdf
8990
# title: Book (PDF)
9091
site:
91-
parts:
92-
footer: footer.md
92+
# No `parts.footer`: from theme v3.0.0 the licence notice and the QuantEcon
93+
# credit are rendered by default, and declaring a footer part replaces that
94+
# whole block. Only a site under other terms supplies one.
95+
#
9396
# Pinned theme release (see https://github.com/QuantEcon/quantecon-theme.mystmd/releases);
9497
# bump the vX.Y.Z in this URL to take a new theme version. The old bundled
9598
# QuantEcon/quantecon-theme repo is archived.
96-
template: https://github.com/QuantEcon/quantecon-theme.mystmd/releases/download/v2.7.0/quantecon-theme.zip
99+
template: https://github.com/QuantEcon/quantecon-theme.mystmd/releases/download/v3.0.0/quantecon-theme.zip
100+
options:
101+
# The site's public URL, which the theme needs for the canonical link,
102+
# og:url and an absolute og:image. Carried over from the Sphinx build's
103+
# `html.baseurl`.
104+
site_url: https://python-programming.quantecon.org/
105+
# Launch is opt-in from theme v3.0.0: the notebook repository is named
106+
# here rather than derived from `project.github`. These two carry over
107+
# from the Sphinx build's `nb_repository_url` and `path_to_docs`; the
108+
# branch defaults to `main`, so it is left unset.
109+
launch_notebook_repo: QuantEcon/lecture-python-programming.notebooks
110+
launch_notebook_source_dir: lectures
111+
launch_colab: true

lectures/need_for_speed.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ kernelspec:
1010
---
1111

1212
(speed)=
13-
```{raw} jupyter
14-
<div id="qe-notebook-header" align="right" style="text-align:right;">
15-
<a href="https://quantecon.org/" title="quantecon.org">
16-
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
17-
</a>
18-
</div>
19-
```
20-
2113
# Python for Scientific Computing
2214

2315
```{epigraph}

lectures/polars.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ kernelspec:
1212
---
1313

1414
(pl)=
15-
```{raw} jupyter
16-
<div id="qe-notebook-header" align="right" style="text-align:right;">
17-
<a href="https://quantecon.org/" title="quantecon.org">
18-
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
19-
</a>
20-
</div>
21-
```
22-
2315
# Polars
2416

2517
```{index} single: Python; Polars

0 commit comments

Comments
 (0)