From 3c35381b71f992eb7a86552697ea647bb76b68b1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 18 Jul 2026 12:19:40 +0300 Subject: Add DETAILS_PAGE setting to make per-photo details pages optional Album owners can now set DETAILS_PAGE=no (or pass --no-details) to skip generating each photo's *-details.html EXIF summary page and its "Details" navigation redirects, without touching the normal thumbnail overview, per-photo view pages, EXIF tooltips, or STATS_PAGE, which all stay independently controlled. Every "Details" link (on view pages and stats filter mini-album view pages) and every "-details" redirect stub is gated on the setting so no generated page ever links to a file that was not rendered. Wired the new field through CONFIG_SPECS (registry-driven defaults/validation/print-config/CLI override), the --details/--no-details CLI flags, usage() help, the verbose effective-config log, shuriken.json generation metadata, and the dry-run plan. DETAILS_PAGE=yes (the default) keeps prior output byte-for-byte identical. Co-Authored-By: Claude Sonnet 5 --- docs/configuration.md | 39 +++++++++++++++++++++++++++++++++------ docs/generation.md | 19 +++++++++++++++++-- docs/usage.md | 2 ++ 3 files changed, 52 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index 69a8835..e07227a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -20,6 +20,7 @@ values for the current run. | `TAR_TIMEOUT` | `120` | Tarball creation timeout in seconds. Positive integer. | | `SHUFFLE` | `no` | Randomly shuffle all previews. `yes`/`no`. | | `SPLASH_PAGE` | `yes` | Generate a splash landing page at `index.html`. `yes`/`no`. | +| `DETAILS_PAGE` | `yes` | Generate each photo's `*-details.html` page (and its "Details" link). `yes`/`no`. See "Details pages" below. | | `STATS_PAGE` | `no` | Generate the EXIF stats site under `stats/`. `yes`/`no`. | | `RANDOM_SEED` | _(unset)_ | Any non-empty value makes splash/background picks, animation classes, timestamps, and shuffle order repeatable. | | `INCOMING_DIR` | `$(pwd)/incoming` | Directory containing source photos (full path). | @@ -38,6 +39,32 @@ values for the current run. > `yes`, so a freshly `--init`'d config enables the tarball. The runtime default > applied when a config file leaves it unset is `no`. +## Details pages + +`DETAILS_PAGE` (default `yes`) controls whether each photo gets its own +`*-details.html` page -- a dedicated view showing the full EXIF summary table, +reachable via the "Details" link on that photo's normal view page and, when +`STATS_PAGE=yes`, from the matching filter mini-album's view pages too. + +Setting `DETAILS_PAGE=no` (or passing `--no-details`) skips generating these +pages entirely and removes every "Details" link that would point at one, so no +generated page ever links to a missing file. Everything else keeps working +unchanged: + +* The normal thumbnail overview pages and per-photo view pages are still + generated. +* The per-photo EXIF tooltip (the `title=""` attribute shown on hover) is + unaffected -- it is controlled independently of the details page. +* `STATS_PAGE` is unaffected: the EXIF stats site and its filter mini-albums + still generate normally with `DETAILS_PAGE=no`; only their "Details" links + (which would otherwise point at the main album's per-photo details page) are + omitted. + +A later `--generate` run that switches `DETAILS_PAGE` from `yes` back to `no` +does not leave stale `*-details.html` files behind: generation stages the new +output in a fresh directory and atomically replaces `DIST_DIR`, so files an +older generation wrote but the current run does not produce are naturally gone. + ## Supported source images Only regular files found directly in `INCOMING_DIR` (not in subdirectories) with @@ -57,11 +84,11 @@ The checks (details in `src/lib/config.validate.source.sh`): `IMAGEMAGICK_TIMEOUT`, `TAR_TIMEOUT`; `HEIGHT` is an optional positive integer. * **Percentage (0-100 integer)**: `THUMB_SUBDIVIDE_PERCENT`, `THUMB_FEATURE_PERCENT`. -* **`yes`/`no` settings**: `SHUFFLE`, `SPLASH_PAGE`, `STATS_PAGE`, - `TARBALL_INCLUDE`, `SYNC_DELETE` (where applicable). +* **`yes`/`no` settings**: `SHUFFLE`, `SPLASH_PAGE`, `DETAILS_PAGE`, + `STATS_PAGE`, `TARBALL_INCLUDE`, `SYNC_DELETE` (where applicable). * **Readable input**: `INCOMING_DIR` must be a readable directory; `TEMPLATE_DIR` must be a readable directory containing the required templates (plus `splash` - when `SPLASH_PAGE=yes`). + when `SPLASH_PAGE=yes`, and `details` when `DETAILS_PAGE=yes`). * **Writable output**: `DIST_DIR` (or its nearest existing parent) must be writable. * **ImageMagick** availability (`magick` or `convert`). @@ -80,9 +107,9 @@ Generation stops before writing album output when validation fails. `CONFIG_SOURCE`, `INCOMING_DIR`, `DIST_DIR`, `TEMPLATE_DIR`, `FAVICON`, `SOURCE_URL`, `TITLE`, `HEIGHT`, `THUMBHEIGHT`, `MAXPREVIEWS`, `THUMB_SUBDIVIDE_PERCENT`, `THUMB_FEATURE_PERCENT`, `IMAGE_JOBS`, -`IMAGEMAGICK_TIMEOUT`, `RANDOM_SEED`, `SHUFFLE`, `SPLASH_PAGE`, `STATS_PAGE`, -`TARBALL_INCLUDE`, `TARBALL_SUFFIX`, `TAR_TIMEOUT`, `TAR_OPTS`, `SYNC_DELETE`, -`SYNC_DESTINATIONS`, `ORIGINAL_BASEPATH`. +`IMAGEMAGICK_TIMEOUT`, `RANDOM_SEED`, `SHUFFLE`, `SPLASH_PAGE`, `DETAILS_PAGE`, +`STATS_PAGE`, `TARBALL_INCLUDE`, `TARBALL_SUFFIX`, `TAR_TIMEOUT`, `TAR_OPTS`, +`SYNC_DELETE`, `SYNC_DESTINATIONS`, `ORIGINAL_BASEPATH`. Scalar values use Bash `%q` quoting; `TAR_OPTS` and `SYNC_DESTINATIONS` are normalized to Bash array assignments, so the output can be parsed by shell diff --git a/docs/generation.md b/docs/generation.md index 4d29840..126f2bd 100644 --- a/docs/generation.md +++ b/docs/generation.md @@ -45,6 +45,20 @@ the site favicon) using the existing `photos` and `blurs` output, so it avoids reprocessing images and rerendering album pages. It requires `SPLASH_PAGE=yes`; pass `--random-seed VALUE` when you need a repeatable pick. +## Details pages + +Every photo gets a `*-details.html` page by default: a dedicated view with the +full EXIF summary table, reachable via the "Details" link on that photo's +normal view page. Set `DETAILS_PAGE=no` or pass `--no-details` to skip +generating these pages; the "Details" link (on the normal view pages and, when +`STATS_PAGE=yes`, on the filter mini-album view pages) is removed along with +it, so no generated page links to a missing file. + +`DETAILS_PAGE=no` only affects the details pages and their links. It does not +disable the per-photo EXIF tooltip (the `title=""` attribute shown on hover +over a photo) or `STATS_PAGE`: both stay independently controlled and keep +working exactly as configured. + ## Stats site `shuriken` can also generate a no-JavaScript stats site with EXIF-derived @@ -97,8 +111,9 @@ metadata records: * generated photo, thumbnail, and HTML file counts; * tarball status (included + file); * effective settings (title, height, thumbheight, maxpreviews, subdivide - percent, feature percent, image jobs, random seed, shuffle, splash page, stats - page, original basepath) useful for debugging a published album. + percent, feature percent, image jobs, random seed, shuffle, splash page, + details page, stats page, original basepath) useful for debugging a published + album. ## Favicon diff --git a/docs/usage.md b/docs/usage.md index 3f85471..9436e36 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -76,6 +76,8 @@ config variable documented in [configuration.md](configuration.md). | `--no-shuffle` | `SHUFFLE=no` | | `--splash` | `SPLASH_PAGE=yes` | | `--no-splash` | `SPLASH_PAGE=no` | +| `--details` | `DETAILS_PAGE=yes` | +| `--no-details` | `DETAILS_PAGE=no` | | `--stats` | `STATS_PAGE=yes` | | `--no-stats` | `STATS_PAGE=no` | | `--tarball` | `TARBALL_INCLUDE=yes` | -- cgit v1.2.3