docs: README image-discipline section reflects the assets/ pipeline

Updates the path (public/images/ → src/assets/projects/) and adds a
sentence describing why the move was made: content-hashed filenames
let the deploy's immutable cache header stay correct across image
swaps without manual cache busts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-27 20:54:53 +02:00
commit 074ea23b1b

View file

@ -73,8 +73,12 @@ and `.dark`. Keep all shadcn-vue token names intact.
## Image discipline
All images live under `public/images/<project>/`. The build pipeline
expects:
All project images live under `src/assets/projects/<slug>/` and flow
through Vite's asset pipeline: `src/data/projects.ts` resolves each
file via `import.meta.glob`, so every image lands in `dist/assets/`
with a content-hashed filename (`08-abc123.jpg`). Any swap changes the
hash, which busts the deploy's `cache-control: immutable` header
automatically — no manual cache-clear, no version query strings.
- Filenames are sequence-numbered (`01.jpg`, `02.jpg`, …) — never
leak addresses, neighborhood names, or owner identities in the
@ -92,7 +96,7 @@ expects:
## Adding a project
1. Drop sequence-numbered images into `public/images/<slug>/`.
1. Drop sequence-numbered images into `src/assets/projects/<slug>/`.
2. Add a new `Project` entry in `src/data/projects.ts` (typed) with
`slug`, `name`, `eyebrow`, `intro`, `cover`, `coverAlt`, and an
`images[]` array. Each image takes a `feature` tag