3 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
edbea966bf refactor(tinytorch): rename site-quarto/ to quarto/
Brings the TinyTorch lab guide's Quarto project in line with
book/quarto/, the only other in-tree Quarto publication that builds
both web and PDF outputs from a single source. The previous name had
three redundancies:

  - already under tinytorch/, so "site-" prefix wasn't disambiguating
  - also produces the PDF lab guide, so "site-" was misleading
  - the top-level site/ dir made "site-quarto" read as "the site's
    quarto config" rather than "the tinytorch site, in quarto"

After this rename the convention is straightforward:

  book/quarto/        -> the textbook (web + PDF)
  tinytorch/quarto/   -> the TinyTorch lab guide (web + PDF)
  mlsysim/docs/       -> mlsysim API reference (kept as docs/, since it
                        really is API reference, not a publication)

Touches 7 GitHub workflows, both .gitignore files, the rename target's
own self-references (Makefile, _quarto.yml configs, STYLE.md,
measure-pdf-images.py), and 6 copies of subscribe-modal.js plus a few
shared scripts/configs whose comments documented the old path.

Verified: rebuilt pdf/TinyTorch-Guide.pdf (2.1M) cleanly from the new
location with 'make pdf' from tinytorch/quarto/.
2026-04-22 14:38:18 -04:00
Vijay Janapa Reddi
2190968942 refactor: deduplicate subscribe-modal + socratiQ via mirror sync script
Quarto's resource-copy step preserves symlinks rather than dereferencing
them, which breaks both local builds (AlreadyExists on the second pass)
and gh-pages deploys (relative symlink targets fall outside _build/).
And Sass resolves @import relative to the importing file's physical
location, not the symlink target. So symlinks inside the resource path
are not a viable dedup mechanism.

Instead, keep real file copies in each consumer subsite and enforce
dedup at edit time with shared/scripts/sync-mirrors.sh:

  - bash shared/scripts/sync-mirrors.sh           # propagate canonicals
  - bash shared/scripts/sync-mirrors.sh --check   # CI: fail on drift

Mirror map (source | mirrors):
  shared/scripts/subscribe-modal.js -> {site, book/quarto, labs, kits,
                                        mlsysim/docs}/.../subscribe-modal.js

Intentional non-mirrors (left untouched, customized variants):
  tinytorch/site-quarto/assets/scripts/subscribe-modal.js  (TinyTorch-branded)
  tinytorch/site/_static/subscribe-modal.js                (legacy Sphinx)

Also dedupe the SocratiQ widget bundle via a symlink (safe here because
book/tools/ sits outside any Quarto project, so the resource walker
never touches it):

  book/tools/scripts/socratiQ/bundle.js -> ../../../quarto/tools/scripts/socratiQ/bundle.js

The shared canonical (book/quarto/tools/scripts/socratiQ/bundle.js) is
the version actually referenced and served in production.
2026-04-19 10:31:41 -04:00
Vijay Janapa Reddi
4de23c16d4 feat(mlsysim): unify navbar with Subscribe button to match Labs/Kits
Add subscribe-modal.js and Subscribe navbar button to MLSYSIM docs
site, matching the unified navbar pattern across all components
(Labs, Kits, MLSYSIM). Right-side items now follow the same order:
Downloads, Star, Support, Subscribe, GitHub.
2026-03-14 19:46:00 -04:00