add: build script that renders index from meals
All checks were successful
Deploy on push / deploy (push) Has been skipped
All checks were successful
Deploy on push / deploy (push) Has been skipped
This commit is contained in:
14
README.md
14
README.md
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user