Quarto renders chapters at contents/vol{N}/{chapter}/{chapter}.html
(depth 3 from site root), which deployed as the double-nested URL
mlsysbook.ai/vol{N}/contents/vol{N}/{chapter}/{chapter}.html.
Fixes:
- Add .github/scripts/flatten-vol-urls.sh: post-build script that
moves contents/vol{N}/* to site root, fixes relative asset paths
(../../../ → ../), search.json hrefs, sitemap.xml, and absolute
URL refs in moved HTML files.
- book-publish-live.yml: run flatten script after artifact download,
before release manifests, for both vol1-site and vol2-site.
- book-preview-dev.yml: add flatten-vol-urls.sh to sparse checkout
and run flatten before rewrite-dev-urls so depth is correct.
- cloudflare-redirects.json: update all 37 "to" values to clean
/vol{N}/{chapter}/... form; add 33 backward-compat entries for
existing /vol{N}/contents/vol{N}/... live URLs.
- instructors/*.qmd: update 77 chapter hrefs to clean URL form.