add: build script that renders index from meals
All checks were successful
Deploy on push / deploy (push) Has been skipped

This commit is contained in:
2026-03-22 19:37:14 -07:00
parent b60452a1f9
commit 6c3ee112f9
6 changed files with 381 additions and 289 deletions

View File

@@ -6,24 +6,26 @@ The site is based on the HTML5 UP Lens template and currently ships as a plain s
## Repo Layout
- `index.html`: main gallery page
- `templates/index.html`: source template for the main gallery page
- `index.html`: generated static gallery page
- `assets/`: site CSS, JavaScript, fonts, and audio
- `images/fulls/`: full-size gallery images
- `images/thumbs/`: gallery thumbnails
- `data/meals.json`: source of truth for gallery entries
- `scripts/render-gallery.js`: regenerates the gallery markup in `index.html` from `data/meals.json`
- `scripts/build.js`: renders static pages from templates and data
- `package.json`: minimal Node build entrypoint
## Content Workflow
Gallery entries now live in `data/meals.json`.
Gallery entries live in `data/meals.json`, and `index.html` is generated from `templates/index.html`.
After editing that file, regenerate the static markup with:
After editing content or templates, rebuild the site with:
```sh
node scripts/render-gallery.js
npm run build
```
The script updates only the generated gallery block inside `index.html`.
The build currently renders the main page without changing the existing Lens gallery structure, so the current client-side viewer code continues to work.
## Image Conventions