mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-08 09:57:21 -05:00
[PR #1410] [MERGED] fix(book): route per-volume builds to per-volume index pages #8177
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1410
Author: @profvjreddi
Created: 4/19/2026
Status: ✅ Merged
Merged: 4/19/2026
Merged by: @profvjreddi
Base:
dev← Head:release-prep/vol-index-routing📝 Commits (1)
edfe891fix(book): route per-volume builds to per-volume index pages📊 Changes
10 files changed (+279 additions, -8 deletions)
View changed files
📝
book/quarto/config/_quarto-epub-vol1.yml(+1 -1)📝
book/quarto/config/_quarto-epub-vol2.yml(+1 -1)📝
book/quarto/config/_quarto-html-vol1.yml(+1 -1)📝
book/quarto/config/_quarto-html-vol2.yml(+1 -1)📝
book/quarto/config/_quarto-pdf-vol1-copyedit.yml(+1 -1)📝
book/quarto/config/_quarto-pdf-vol1.yml(+1 -1)📝
book/quarto/config/_quarto-pdf-vol2-copyedit.yml(+1 -1)📝
book/quarto/config/_quarto-pdf-vol2.yml(+1 -1)➕
book/quarto/index-vol1.qmd(+135 -0)➕
book/quarto/index-vol2.qmd(+136 -0)📄 Description
Summary
Critical release-blocker: the deployed dev mirror's
/book/vol1/page renders vol2 content (h1 "Machine Learning Systems at Scale", vol2 cover image), and the cover image 404s on both volumes. Without this fix, the first vol1 publish tomlsysbook.aiwould ship vol2's welcome page under the vol1 URL.Root cause
Symlink misroutes vol1's index —
book/quarto/index.qmdis a symlink tocontents/vol2/index.qmd(commit74cff1e833). Both_quarto-html-vol1.ymland_quarto-html-vol2.ymldeclarerender: - index.qmd, so vol1 ends up rendering vol2's welcome content. The h1 we see on the live dev page proves this:Machine Learning Systems at Scale
` (that's vol2's title)../../cover/audio paths 404 — bothcontents/vol1/index.qmdandcontents/vol2/index.qmdset the cover<img src>and podcast<source src>to../../assets/.... Quarto leaves paths inside\``{=html}raw blocks verbatim, so on the deployed page at/book/volX/index.html,../../assets/...resolves above the per-volume deploy root (where no asset exists) instead of the per-volumeassets/directory (where Quarto actually copies it viaresources:`).Fix
book/quarto/index-vol1.qmdandbook/quarto/index-vol2.qmdat the project root, copied from each volume's existingcontents/volX/index.qmdwith two corrections:<img src>and podcast<source src>lose the../../prefix.output-file: index.htmlin the front matter so the rendered artifact lands as_build/html-volX/index.htmldirectly (no redirect stub).index-volX.qmdinstead of the sharedindex.qmdsymlink.book/quarto/index.qmd(no longer rendered, kept for local dev tooling) andbook/quarto/contents/volX/index.qmd(still the sidebar "Volume home" landing under each volume).Verification (local)
```
cd book/quarto
quarto render index-vol1.qmd --to html
```
Produces a single
_build/html-vol1/index.html(no redirect stub). Probed viapython3 -m http.server:/<title>Introduction to Machine Learning Systems/<h1 class="title">Machine Learning Systems at Scale(wrong, vol2)Introduction to Machine Learning Systems✓/assets/images/covers/cover-hardcover-book-vol1.png../../)/assets/media/notebooklm_podcast_mlsysbookai.mp3../../)Test plan
book-validate-dev.ymlbuilds vol1 and vol2 cleanlydev, the dev-mirror smoke probe should show:/book/vol1/→<h1 class="title">Introduction to Machine Learning Systems</h1>/book/vol1/assets/images/covers/cover-hardcover-book-vol1.png→ 200/book/vol2/→<h1 class="title">Machine Learning Systems at Scale</h1>(still correct)/book/vol2/assets/images/covers/cover-hardcover-book-vol2.png→ 200Risk
contents/files are untouched. PDF/EPUB configs are updated symmetrically with HTML so no format will silently drift.Discovered by
Live URL probing while preparing the staged release. The bug had been latent since the index symlink was repointed at vol2 during vol2 development; vol1 hadn't been re-published since.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.