Background
As part of the QuantEcon Actions migration (see QuantEcon/actions#25 and PLAN.md), we're simplifying our notebook deployment architecture.
Current design:
- Lecture repos (e.g.,
lecture-python.myst) build notebooks via sphinx-tojupyter
- Notebooks are synced to separate
.notebooks repos (e.g., lecture-python.notebooks)
- Colab badges link to:
https://colab.research.google.com/github/QuantEcon/{repo}.notebooks/blob/main/{path}
New design:
- Notebooks are deployed to gh-pages alongside HTML content in
_notebooks/ directory
- Colab badges link to:
https://colab.research.google.com/notebook?url=https://{domain}/_notebooks/{path}
- Eliminates 4 separate
.notebooks repos and sync workflows
Requested Changes
Update Colab badge/link generation to support notebooks hosted on gh-pages:
Current URL format:
https://colab.research.google.com/github/QuantEcon/lecture-python.notebooks/blob/main/example.ipynb
New URL format:
https://colab.research.google.com/notebook?url=https://python.quantecon.org/_notebooks/example.ipynb
Implementation Notes
- Google Colab supports opening notebooks from any public URL via the
url parameter
- The
{domain} should be configurable per lecture series:
lecture-python.myst → python.quantecon.org
lecture-python-programming.myst → python-programming.quantecon.org
lecture-python-intro → (Netlify domain)
lecture-python-advanced.myst → python-advanced.quantecon.org
- Notebooks are already copied to
_build/html/_notebooks/ via the build-lectures action with html-copy-notebooks: 'true'
Benefits
- ✅ Reduces repo count from 8 to 4 (eliminates
.notebooks repos)
- ✅ Eliminates sync step in publish workflows
- ✅ Single source of truth for notebooks
- ✅ Simpler maintenance
Related
- QuantEcon/actions PLAN.md — Migration strategy
- QuantEcon/actions PR #25 — ML libs removal
- Primary user access: (1) Download links on lecture pages, (2) Colab badges on lecture pages
Timeline
Needed for upcoming lecture repository migrations (Q1 2026).
cc @mmcky
Background
As part of the QuantEcon Actions migration (see QuantEcon/actions#25 and PLAN.md), we're simplifying our notebook deployment architecture.
Current design:
lecture-python.myst) build notebooks viasphinx-tojupyter.notebooksrepos (e.g.,lecture-python.notebooks)https://colab.research.google.com/github/QuantEcon/{repo}.notebooks/blob/main/{path}New design:
_notebooks/directoryhttps://colab.research.google.com/notebook?url=https://{domain}/_notebooks/{path}.notebooksrepos and sync workflowsRequested Changes
Update Colab badge/link generation to support notebooks hosted on gh-pages:
Current URL format:
New URL format:
Implementation Notes
urlparameter{domain}should be configurable per lecture series:lecture-python.myst→python.quantecon.orglecture-python-programming.myst→python-programming.quantecon.orglecture-python-intro→ (Netlify domain)lecture-python-advanced.myst→python-advanced.quantecon.org_build/html/_notebooks/via thebuild-lecturesaction withhtml-copy-notebooks: 'true'Benefits
.notebooksrepos)Related
Timeline
Needed for upcoming lecture repository migrations (Q1 2026).
cc @mmcky