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:
parent
d18319d593
commit
074ea23b1b
1 changed files with 7 additions and 3 deletions
10
README.md
10
README.md
|
|
@ -73,8 +73,12 @@ and `.dark`. Keep all shadcn-vue token names intact.
|
||||||
|
|
||||||
## Image discipline
|
## Image discipline
|
||||||
|
|
||||||
All images live under `public/images/<project>/`. The build pipeline
|
All project images live under `src/assets/projects/<slug>/` and flow
|
||||||
expects:
|
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
|
- Filenames are sequence-numbered (`01.jpg`, `02.jpg`, …) — never
|
||||||
leak addresses, neighborhood names, or owner identities in the
|
leak addresses, neighborhood names, or owner identities in the
|
||||||
|
|
@ -92,7 +96,7 @@ expects:
|
||||||
|
|
||||||
## Adding a project
|
## 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
|
2. Add a new `Project` entry in `src/data/projects.ts` (typed) with
|
||||||
`slug`, `name`, `eyebrow`, `intro`, `cover`, `coverAlt`, and an
|
`slug`, `name`, `eyebrow`, `intro`, `cover`, `coverAlt`, and an
|
||||||
`images[]` array. Each image takes a `feature` tag
|
`images[]` array. Each image takes a `feature` tag
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue