Why it exists, how it works, and the four files you always commit
⏱ ~10 minutes
Five analysts. Five laptops. Five sets of raw data — none of which can go into git (too large, potentially sensitive). One published book on GitHub Pages.
How does GitHub build the full report when it has none of the raw data?
The answer is the freeze cache.
When you render your chapter locally:
quarto render chapters/05-environment/index.qmd
Quarto runs your R code, produces your charts and tables, then saves a photograph of all the outputs to the _freeze/ directory:
The html.json file contains everything needed to rebuild your chapter page: every table, every number, every chart reference.
Each time GitHub builds the book, Quarto checks whether your source file has changed by comparing fingerprints (hashes):
Critical rule
Every time you change your chapter source, you must re-render locally and commit the updated html.json. Even a one-word edit to a heading will break the fingerprint match.
A contribution to this book is never a single file. It is always exactly these four things:
The narrative and code for your chapter.
The indicator script that processes raw data into a fact CSV.
The processed indicator data. Small enough to commit; no sensitive raw data.
The freeze snapshot. Without this, GitHub can't render your chapter.
Start from a fresh main — always branch from an up-to-date main before doing any work. git checkout main && git pull && git checkout -b yourname/chapter-name
Render your chapter locally — your raw data must be in data/raw/. quarto render chapters/0X-topic/index.qmd
Check what git sees — verify the four files appear as modified or untracked, and that nothing unexpected has changed. git status
Stage exactly the right files — name them individually, never git add .
Commit and push to your branch.
Missing any of the four files means a publishing failure. The freeze snapshot is the most commonly forgotten.
Click an answer. Explanations reveal after each selection.
You make a small edit to your chapter — fixing a typo in a heading. What happens when GitHub Actions tries to build the book?
html.json.
Which four files must always be committed together for a successful contribution?
.qmd, (2) indicator R script in scripts/R/, (3) fact CSV in data/fact/, and (4) the freeze snapshot html.json. Never commit renv.lock, .Rproj, raw data, or .Renviron — these belong to the project lead or stay local.
What does the html.json file inside _freeze/ actually contain?
html.json as a photograph of everything your code produced: every table cell, every chart reference, every computed number. It also stores the source file's fingerprint so Quarto knows whether the source has changed since the snapshot was taken. This is the entire mechanism that lets GitHub build the book without your raw data.
The one thing to remember
Change your chapter → re-render → commit the updated html.json. Every time, without exception.
Primary source: WORKFLOW_LEARNING_GUIDE.md — the authoritative guide for this project's publish workflow.
Have a question? Ask your teacher in this conversation — just type it and continue the session.