From e7aeb1f998aef664d3fc6cc21dc8c3b6b7579d01 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 15 Jun 2026 18:48:49 +0300 Subject: Move the stats site into a stats/ subdir to keep the album root small The filter mini-albums put thousands of HTML files directly in the album root. Reorganise so only the main album lives in DIST_DIR and all stats content goes under stats/: stats/index.html - the stats overview (was stats.html) stats//index.html - each filter gallery (was .html) stats//.html - each filter view page (was --N.html) Each mini-album is its own directory, so no single directory holds more than one filter's pages. Links updated accordingly: the overview links to /, the gallery thumbnails link to sibling .html, view prev/next/gallery are same-dir, and assets/album-details/back-to-stats resolve via the ../.. backhref. The header Stats link and camera.tmpl back link point at stats/index.html. Mini-albums still reuse the shared photos/thumbs/blurs assets and render in parallel. Tests and the dry-run plan updated for the new layout; README documents the stats/ subdirectory structure. Co-Authored-By: Claude Opus 4.8 --- src/lib/album.source.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/lib/album.source.sh') diff --git a/src/lib/album.source.sh b/src/lib/album.source.sh index 17502ff..532c218 100644 --- a/src/lib/album.source.sh +++ b/src/lib/album.source.sh @@ -1091,8 +1091,10 @@ clear_exif_cache() { generate_stats_pages() { log_verbose 'Stats page enabled; collecting EXIF stats' collect_photo_exif_stats - render_stats_page . . - render_filter_pages . . + # Keep the album root uncluttered: the stats overview is stats/index.html and + # every filter mini-album lives under stats// (see render_filter_pages). + render_stats_page stats .. index + render_filter_pages } generate() { @@ -1285,10 +1287,11 @@ print_dry_run_plan() { printf ' %s/[redirect].html (%s navigation redirects)\n' \ "${plan_ref["dist_dir"]}" "${plan_ref["redirect_count"]}" if [ "${plan_ref["stats_page"]}" = yes ]; then - # The exact camera-page count needs EXIF aggregation, which dry-run - # does not perform, so list them as a wildcard. - printf ' %s/stats.html (EXIF stats page)\n' "${plan_ref["dist_dir"]}" - printf ' %s/camera-*.html (per-camera pages)\n' \ + # The exact filter mini-album set needs EXIF aggregation, which dry-run + # does not perform, so list them as a wildcard under stats/. + printf ' %s/stats/index.html (EXIF stats page)\n' \ + "${plan_ref["dist_dir"]}" + printf ' %s/stats/*/ (filter mini-albums)\n' \ "${plan_ref["dist_dir"]}" fi if [ "${plan_ref["tarball_include"]}" = yes ]; then -- cgit v1.2.3