Skip to content

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

Description

@mmcky

Part of #147 (parity study 2026-09-11 — migration readiness).

Revised in place 2026-09-11: the footer item follows the #203 decision (a theme default); two items came out of the #204 decision (the notebook header setting and the {raw} source rewrite); the launch item follows the #205 decision (explicit, opt-in launch options); and the #207 review added the site URL and old URLs items; and #210's close moved the Sphinx options with no counterpart into this page.

Problem

A lecture repo moving from quantecon-book-theme to this theme has to set up several things in myst.yml, in its lecture sources or in CI that its Sphinx build handled another way. Three came with the Sphinx theme and needed no per-repo setup: a hard-coded licence footer, a built-in MathJax macro set, and a per-page git lookup for "Last changed". The rest are set per repo today, but under _config.yml keys this theme does not read: the notebooks repo, the document language, the Google Analytics ID, and the description and keywords. The lecture sources also carry Sphinx-only {raw} blocks, and the notebook header now has to come from configuration. The docs explain most of the new mechanisms one feature at a time. No page lists them as steps for a migrating repo, and neither docs/ nor the README mentions maths macros at all.

mystmd's Jupyter Book config upgrade does not carry these settings across either. It reads the analytics ID only from the html section, sets project.github only from a top-level repository.url, and types sphinx.config as an opaque record that upgradeConfig never reads (config.ts:99-106, config.ts:147-236, config.ts:185-200). lecture-python-programming, for example, has no top-level repository key and keeps these settings under sphinx.config (_config.yml:17-69).

Item by item:

The experimental jb2 conversion in QuantEcon/lecture-python-programming#363 (open) does not yet carry most of these. Its myst.yml sets project.github and a footer, but no plugins, math, description, keywords or site.options (myst.yml:16-18, myst.yml:90-96). Under #203 its footer.md is to be removed so the theme default applies.

Proposed change

Add a migration checklist page, docs/migrating.md, for lecture repos moving from quantecon-book-theme, and link it from the Pages table in docs/index.md:25-38. For each item, the page says what it replaces in the Sphinx build, what to do in the MyST build, and which page has the detail. This change is documentation only.

Checklist item Replaces (Sphinx) Do in the MyST build Detail in
Licence footer the footer hard-coded in the theme nothing, since the theme renders the CC BY-SA 4.0 notice and credit by default (#203). Only a repo whose content is under other terms adds a site.parts.footer file, which replaces the default docs/layout.md
Maths macros the theme's MathJax macros, or the repo's own mathjax3_config project.math entries: \epsilon\varepsilon for repos without their own mathjax3_config, plus each mathjax3_config macro, with array-form macros rewritten as strings this page (no docs page covers maths)
"Last changed" the theme's own git lookup the git-metadata plugin under project.plugins, and fetch-depth: 0 on every workflow checkout that builds HTML, PR previews included docs/git-metadata.md
Launch notebooks nb_repository_url, nb_branch, nb_path_to_notebooks, path_to_docs and launch_buttons.colab_url only if the notebooks repository exists: launch_notebook_repo (from nb_repository_url), launch_colab: true, and launch_notebook_branch, launch_notebook_dir and launch_notebook_source_dir where the Sphinx config sets their counterparts. A repo with no notebooks repository sets none of them and shows no Launch (#205) docs/launch.md
Notebook header the {raw} jupyter block at the top of each lecture file project.settings.myst_to_ipynb.header in myst.yml (QuantEcon/mystmd#108) the fork's docs/settings.md, once QuantEcon/mystmd#108 ships
Lecture sources Sphinx-only {raw} blocks: the notebook header, embedded iframes, HTML tables run the source rewrite decided on #204 before the first mystmd build #204
Site URL html.baseurl site.options.site_url, the site's public URL (for example https://python-programming.quantecon.org/) docs/configuration.md
Old URLs every page's .html path, plus the rediraffe_redirects and sphinx-reredirects redirects maps the redirects from QuantEcon/mystmd#113, once it ships: old Sphinx paths redirect automatically, and each map entry moves to site.redirects QuantEcon/mystmd#113
Document language Sphinx language, and current_language / languages under html_theme_options site.options.current_language as a BCP 47 code (for example zh-cn for Sphinx zh_CN), and site.options.languages as a YAML block string docs/rtl-support.md
Analytics html_theme_options.analytics.google_analytics_id site.options.analytics_google docs/configuration.md
Description and keywords top-level description, and description / keywords under html_theme_options project.description and project.keywords docs/configuration.md, once its "Other site keys the theme uses" table lists them

Sphinx options with no counterpart. The page also carries a single table of the book-theme options that have no counterpart in this theme, each with its reason: unused by the lecture sites, inert in the book theme, dropped by an earlier decision, or open in a named issue. docs/index.md points its promise ("where a Sphinx option has no counterpart, its page says so") at this table, and the docs review task on #147 makes that change. The keys, carried over from #210 (theme keys are in the book theme's theme.conf unless noted):

Keys Source Study rows
quantecon_project, header_organisation, header_organisation_url, dark_logo, html_logo theme.conf lines 39, 24, 25 and 13; html_logo is Sphinx core F033, F020, F014
authors_label, mainpage_author_fontsize theme.conf lines 10 and 29 F082, F007
persistent_sidebar, home_page_in_toc theme.conf lines 37 and 26; persistent_sidebar is open in #214 F005, F003
contents_autoexpand (its False mode) theme.conf line 30 F011
last_modified_date_format __init__.py L674 F084
inline_literal_box theme.conf line 20; the decision is open in #180 F036
announcement_expires, announcement_style theme.conf lines 7-8; the banner itself is already documented as not offered F017, F018
exercise_style, proof_minimal_theme, togglebutton_hint sphinx-exercise, sphinx-proof and sphinx-togglebutton settings F050, F051, F049
html_css_files, html_js_files Sphinx core X03
single_page, expand_sections, plugins_list theme.conf lines 43, 19 and 38; inert in the book theme itself F093

The maths recipe to include. Checked 2026-09-11 with the theme's KaTeX 0.16.33: \epsilon renders as U+03F5 by default and as U+03B5 with this macro.

project:
  math:
    '\epsilon': '\varepsilon'

Some items depend on work still open, so the page should describe the state as it stands when it lands:

Acceptance criteria

Context

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationRepo docs and contributor meta (not lecture content)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions