refactor: clean up gallery tooling and document the workflow
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:
37
README.md
37
README.md
@@ -16,11 +16,47 @@ The site is based on the HTML5 UP Lens template and currently ships as a plain s
|
||||
- `data/meals.json`: source of truth for gallery entries
|
||||
- `data/elo.json`: Elo ratings, record totals, and ranking settings
|
||||
- `scripts/build.js`: renders static pages from templates and data
|
||||
- `scripts/check.js`: validates data, image assets, and generated pages
|
||||
- `scripts/generate-thumbnails.js`: regenerates thumbnails from the full-size images
|
||||
- `scripts/ingest-meal.js`: ingests a new meal image and metadata in one command
|
||||
- `scripts/serve.js`: serves the generated site locally with a small static file server
|
||||
- `scripts/lib/elo.js`: validates and syncs Elo data against the meal list
|
||||
- `package.json`: minimal Node build entrypoint
|
||||
|
||||
## Run Locally
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
Build the site and validate the generated output:
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
Serve it locally:
|
||||
|
||||
```sh
|
||||
npm run serve
|
||||
```
|
||||
|
||||
Then open `http://127.0.0.1:4321`.
|
||||
|
||||
If you want a single command that builds and serves, run:
|
||||
|
||||
```sh
|
||||
npm start
|
||||
```
|
||||
|
||||
To validate the repo state without rebuilding thumbnails or pages, run:
|
||||
|
||||
```sh
|
||||
npm run check
|
||||
```
|
||||
|
||||
## Content Workflow
|
||||
|
||||
Gallery entries live in `data/meals.json`, and the build generates both `index.html` and `rankings.html` from the template and data files.
|
||||
@@ -99,4 +135,3 @@ The `x` and `y` values are normalized from `0` to `1`, where `0.5, 0.5` is the c
|
||||
## Planned Features
|
||||
|
||||
1. Optional shared sync or export/import for rankings if browser-local persistence becomes too limiting.
|
||||
2. General cleanup and history cleanup once the bigger structural changes are in place.
|
||||
|
||||
Reference in New Issue
Block a user