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 --- share/templates/default/view.tmpl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/templates/default/view.tmpl b/share/templates/default/view.tmpl index c28859b..afabe29 100644 --- a/share/templates/default/view.tmpl +++ b/share/templates/default/view.tmpl @@ -1,5 +1,7 @@ # A non-empty EXIF summary becomes a title="" attribute so hovering the image -# shows the camera/exposure details, mirroring the details view. +# shows the camera/exposure details, mirroring the details view. This tooltip is +# independent of the Details link below: it stays available even when +# DETAILS_PAGE=no has suppressed the details page itself. if [ -n "$render_exif_tooltip_html" ]; then render_exif_tooltip_attr=" title=\"$render_exif_tooltip_html\"" else @@ -14,7 +16,20 @@ cat < Thumbnails | +END + +# The Details link is only emitted when DETAILS_PAGE=yes actually rendered the +# *-details.html page it points to; otherwise it would be a dangling link. +# Keeping this as its own conditional cat block (rather than inlining the link +# into a shell variable) keeps the DETAILS_PAGE=yes output byte-for-byte +# identical to before this toggle existed. +if [ "${render_details_page_html}" = 'yes' ]; then + cat <Details | +END +fi + +cat <Direct link -- cgit v1.2.3