Incremental builds, one read at a time

A full build of a small site takes a second. Saving a file forty times an hour turns that second into a habit of waiting.

Track reads, not files

Every layout reads something: a title, a date, the list of posts. If the build records those reads, it can answer a precise question after each save: which pages read the thing that changed?

  1. Render each page through a proxy that notes the keys it touches.
  2. Fingerprint the values behind those keys.
  3. On the next save, compare fingerprints and render only the pages whose reads changed.

The boring part

The proxy is twenty lines. The hard part is making sure the incremental output is byte for byte the full build's, which is why every test runs both and compares them.

New posts and the best notes in your inbox. No tracking, and you can leave with one click.