summaryrefslogtreecommitdiff
path: root/src/lib/config.validate.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-18 12:19:40 +0300
committerPaul Buetow <paul@buetow.org>2026-07-18 12:19:40 +0300
commit3c35381b71f992eb7a86552697ea647bb76b68b1 (patch)
tree56e478547e0cb47ac7403304c997846fb3fea8a4 /src/lib/config.validate.source.sh
parenta7588bf270ef2c2f6dd2893d0129e526cbf8d89c (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/config.validate.source.sh')
-rw-r--r--src/lib/config.validate.source.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/lib/config.validate.source.sh b/src/lib/config.validate.source.sh
index 3ca720a..345ec6d 100644
--- a/src/lib/config.validate.source.sh
+++ b/src/lib/config.validate.source.sh
@@ -113,8 +113,20 @@ validate_template_file() {
validate_template_dir() {
local template_name
- local -a required_templates=(
- details
+ local -a required_templates=()
+
+ validate_template_dir_access || return
+
+ # details.tmpl is only needed when DETAILS_PAGE=yes actually renders it
+ # (mirrors the SPLASH_PAGE=yes conditional below), so an album that opts out
+ # of details pages does not need to keep a details.tmpl around at all. Kept
+ # first in the list (as it always was) so the reporting order for the
+ # unconditional templates below is unchanged from before DETAILS_PAGE
+ # existed.
+ if [ "$DETAILS_PAGE" = yes ]; then
+ required_templates+=(details)
+ fi
+ required_templates+=(
footer
header
next
@@ -125,8 +137,6 @@ validate_template_dir() {
view
)
- validate_template_dir_access || return
-
if [ "$SPLASH_PAGE" = yes ]; then
required_templates+=(splash)
fi
@@ -290,6 +300,7 @@ validate_common_config() {
SYNC_TIMEOUT
SHUFFLE
SPLASH_PAGE
+ DETAILS_PAGE
STATS_PAGE
TARBALL_INCLUDE
FAVICON