2 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
5213a16eda refactor(styles): centralize brand color tokens, document SCSS architecture
shared/styles/_brand.scss is the single source of truth for raw brand
hex values (Harvard Crimson, ETH Blue, callout palette). Theme files
consume these tokens to derive semantic variables ($accent, $accent-dark,
$callout-*) used by the rest of the SCSS layer.

Why: previously the same hex codes were duplicated across both theme
files (and would have been duplicated again if a third volume were
added). A rebrand currently requires touching the listed non-SCSS uses
in shared/styles/BRAND.md (HTML meta theme-color, plain CSS, inline
QMD styles, SVG fills, JS/Python/TSX constants). Centralizing the SCSS
side at least removes duplication within the SCSS layer.

book/quarto/assets/styles/_brand.scss is a tracked mirror of the
canonical (kept in sync via shared/scripts/sync-mirrors.sh). Required
because Sass resolves @import relative to the importing file's physical
location, so the book's theme files need _brand.scss reachable as ../brand.

shared/styles/README.md adds a file map, a Mermaid diagram of the
import graph (consumer entrypoint -> theme -> brand -> base partials),
per-subsite entrypoint table, and conventions for adding a new theme.
2026-04-19 10:31:41 -04:00