Skip to content

docs: add a migration checklist for repos moving off the Sphinx theme - #226

Merged
mmcky merged 4 commits into
mainfrom
claude/funny-meitner-i34zme-209-migrating
Sep 12, 2026
Merged

docs: add a migration checklist for repos moving off the Sphinx theme#226
mmcky merged 4 commits into
mainfrom
claude/funny-meitner-i34zme-209-migrating

Conversation

@quantecon-services

@quantecon-services quantecon-services commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Closes #209. Documentation only — no code, no tests, no pixels.

What it adds

docs/migrating.md, covering all eleven items from the issue's table. Each names what it replaces in the Sphinx build, what to set in the MyST build, and where the detail lives:

Step The short version
Licence footer nothing to do (#203's default); a footer file replaces the whole default
Maths macros project.math, with the \epsilon\varepsilon recipe and the array-form rewrite
Last changed the plugin and fetch-depth: 0 on every workflow checkout that builds HTML
Launch notebooks the five #205 options, mapped from the Sphinx keys; set the repo only if it exists
Notebook header settings.myst_to_ipynb.header
Lecture sources run #204's rewrite script before the first mystmd build
Site URL html.baseurlsite.options.site_url
Old URLs collect the existing redirect maps
Document language zh_CNzh-cn, plus the languages YAML block
Analytics analytics_google
Description and keywords project.description / project.keywords

It opens by saying the steps are manual: myst init reads the analytics ID only from the html section, takes project.github only from a top-level repository.url, and never reads sphinx.config — which is where the lecture configs keep most of these.

Two items carry an explicit "not shipped yet" note, as the issue asks: the notebook-header setting (QuantEcon/mystmd#108) and build-time redirects (QuantEcon/mystmd#113).

The no-counterpart table

The page carries the table of quantecon-book-theme options with no counterpart here, each with a reason, and docs/index.md's promise — "where a Sphinx option has no counterpart, its page says so" — now points at that table rather than at the individual pages.

I checked the reasons rather than asserting them, and softened three I had written from assumption: the header logo really is hard-coded (/logos/qemb-logo.png), the byline carries no label at all (so authors_label has nothing to label), and for html_css_files the nearest thing is the myst-theme.css mystmd serves at the site root — with no slot for extra scripts, which I now say plainly instead of implying parity.

Also

docs/configuration.md gains project.description, project.keywords and project.math in the "Other site keys the theme uses" table, as the criteria require.

Depends on the other gate PRs

The page describes #203, #204, #205 and #207 as shipped, which is right for the order the issue list is being worked but not until those merge: #221, #222, #224 and #227. If any of them changes shape in review, the matching section here needs the same edit. Worth merging this one last.

One correction that belonged elsewhere: docs/configuration.md still credited project.github with "the notebook repo derivation", which #205 removes. I pushed that fix to #224's branch rather than carrying it here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UZLpDVYu1YBZHQfwkRRJj7

A lecture repository leaving `quantecon-book-theme` has to set up
several things its Sphinx build handled another way, and no page listed
them as steps. Three came with the Sphinx theme and needed no per-repo
setup at all; the rest are configured today under `_config.yml` keys
this theme does not read.

`myst init` carries none of them across: it reads the analytics ID only
from the `html` section, takes `project.github` only from a top-level
`repository.url`, and never reads `sphinx.config`, which is where the
lecture configs keep most of these.

The page also carries the table of Sphinx theme options with no
counterpart here, each with its reason, and `docs/index.md` now points
its "where a Sphinx option has no counterpart" promise at that table
rather than at the individual pages.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZLpDVYu1YBZHQfwkRRJj7
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-12 02:11 UTC

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

🎭 Visual regression results

passed  47 passed
skipped  14 skipped

Details

stats  61 tests across 2 suites
duration  1 minute, 30 seconds
commit  5c122f6

Skipped tests

mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › without JavaScript › drawer-opens-without-javascript
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › drawer-closes-when-search-opens
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › launch-colab
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › live-compute-toggle
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › live-compute-toggle-absent-without-thebe
mobile-chrome › theme.spec.ts › On this page outline › outline-pinned-and-nested
mobile-chrome › theme.spec.ts › On this page outline › outline-tracks-scroll
mobile-chrome › theme.spec.ts › On this page outline › outline-unnumbered
mobile-chrome › theme.spec.ts › On this page outline › outline-within-viewport
mobile-chrome › theme.spec.ts › Meta/SEO and notebook output › social-meta
mobile-chrome › theme.spec.ts › Meta/SEO and notebook output › stderr-collapsed
mobile-chrome › theme.spec.ts › Site options reach the theme › site-options
mobile-chrome › theme.spec.ts › Site footer › default-footer-without-part
mobile-chrome › theme.spec.ts › Site footer › declared-part-replaces-default

The migration page's table is where that promise now points, but the
sentence also carries the PLAN.md reference the docs review rewrites in
the same paragraph. Changing it in both places would only collide, so
this keeps to the Pages-table row its own acceptance criteria name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZLpDVYu1YBZHQfwkRRJj7

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The doc's correctness depends on the merge ordering of four separate unmerged PRs (#221, #222, #224, #227) — e.g. it documents launch_notebook_*/launch_colab options the current template.yml does not declare — which requires human coordination.

Pull request overview

This documentation-only PR adds docs/migrating.md, a step-by-step checklist for lecture repositories moving off the Sphinx quantecon-book-theme. It closes #209 by walking through the eleven settings the Sphinx build handled differently (licence footer, maths macros, "Last changed", launch notebooks, notebook header, {raw} source rewrite, site URL, old URLs, document language, analytics, description/keywords), naming for each what it replaces in Sphinx and what to set in MyST. It also carries the table of quantecon-book-theme options with no MyST counterpart, and wires the new page into the docs index and configuration reference.

I verified the technical claims that are already implementable against the current codebase (default lang="en" in app/i18n.ts:189, og:locale from current_language in app/seo.ts:112, description/keywords meta in the route modules, the pinned git-metadata plugin URL matching docs/git-metadata.md:17), and all internal anchors/links resolve. Note that several sections intentionally describe forward-looking state that depends on other unmerged PRs (#221 footer default, #222 {raw} rewrite script, #224 the launch_notebook_*/launch_colab options, #227 canonical/base-URL links) — the author flagged this in the description and recommends merging this PR last.

Changes:

  • Add docs/migrating.md with the eleven-item migration checklist and the "no counterpart" options table.
  • Register the new page in docs/index.md and add project.description/project.keywords/project.math rows to docs/configuration.md.
  • Add an UnreleasedAdded entry in CHANGELOG.md.
File summaries
File Description
docs/migrating.md New migration checklist; content correct for the post-cutover state but references launch options (launch_notebook_*, launch_colab) and a default footer that only exist once #224/#221 merge.
docs/index.md Adds a "migrating" row to the Pages table.
docs/configuration.md Documents project.description, project.keywords, project.math in the "Other site keys" table (verified against code).
CHANGELOG.md Adds the Added entry; links the issue but omits the required PR link.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CHANGELOG.md Outdated
mmcky and others added 2 commits September 12, 2026 12:00
#221, #222, #224 and #225 all landed entries under `## [Unreleased]`
while this was open. This branch's entry is `### Added` like two of
theirs, so it folds into that list rather than forming a second section:
Added (default site footer, `{raw}` rewriter, this checklist), then
main's Changed and Fixed sections unchanged.

The entry also gains its PR link alongside the issue link, which is what
CONTRIBUTING.md:225-227 asks for.

`docs/configuration.md` auto-merged, and was checked rather than assumed:
main's launch rows from #224 and this branch's `project.description`,
`project.keywords` and `project.math` rows are all present, with no row
duplicated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Site URL section read as though `site_url` is what makes the theme
emit a canonical link. `site_url` has existed since 2.7.0, but no page
carries a canonical link on main at all: that is #207, implemented by
#227, which is still open. Without this note the section describes a
feature the theme does not have, and it would only become true if this
branch merged after that one -- a doc should not depend on merge order to
be accurate.

The wording follows the two callouts already in the file, which flag
QuantEcon/mystmd#108 for the notebook header setting and QuantEcon/mystmd#113
for build-time redirects.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mmcky
mmcky merged commit 81c9b86 into main Sep 12, 2026
4 checks passed
@mmcky
mmcky deleted the claude/funny-meitner-i34zme-209-migrating branch September 12, 2026 02:11
mmcky added a commit that referenced this pull request Sep 12, 2026
#221, #222, #224, #225 and #226 all landed entries under `## [Unreleased]`
while this was open. This branch adds one `### Added` entry and one
`### Fixed` entry, so each folds into the matching section rather than
opening a second: Added (default site footer, `{raw}` rewriter, migration
checklist, this canonical link), Changed (the breaking launch change),
Fixed (output image centring, these base-URL head links).

Both entries also gain their PR link beside the issue link, which is what
CONTRIBUTING.md:225-227 asks for.

`README.md`, `docs/configuration.md`, `template.yml` and
`tests/visual/theme.spec.ts` auto-merged. Each was checked rather than
assumed: both sides' content is present in all four.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 12, 2026
#221, #222, #224, #225, #226 and #227 all landed entries under
`## [Unreleased]` while this was open. This branch adds one `### Added`
entry, so it folds into that list rather than opening a second section,
and it gains its PR link beside the issue link, which is what
CONTRIBUTING.md:225-227 asks for.

`docs/layout.md`, `styles/quantecon.css` and `tests/visual/theme.spec.ts`
auto-merged. Each was checked rather than assumed: the branch's h4 indent
rule sits beside main's output-image centring rule, the branch's outline
assertions beside main's footer, launch, centring and canonical tests, and
the branch's h2-to-h4 documentation beside main's default-footer section.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 12, 2026
#221, #222, #224, #225, #226, #227 and #228 all landed `[Unreleased]`
entries while this was open. This branch adds a `### Fixed` entry, so it
folds into main's existing Fixed section (output image centring, base-URL
head links) rather than opening a second one, and it gains its PR link
beside the issue link per CONTRIBUTING.md:225-227.

`docs/configuration.md`, `docs/index.md` and `docs/layout.md` auto-merged,
and each was checked rather than assumed: layout.md holds this branch's
Header and Widths rewrites beside #228's h2-to-h4 outline text and #221's
default-footer section; index.md holds #226's Pages-table row beside this
branch's rewritten closing paragraph; configuration.md holds the rows from
all four PRs that touched its table.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

Lecture repos moving off the Sphinx theme have no checklist of what myst.yml and CI must now set

4 participants