diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-15 18:48:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-15 23:50:41 +0300 |
| commit | e7aeb1f998aef664d3fc6cc21dc8c3b6b7579d01 (patch) | |
| tree | 08ba293284c3ad5293fb2252407f83b5ddfebeb0 /src/lib/album.source.sh | |
| parent | 66a39be5271393b95cddae1bd61206eea8427934 (diff) | |
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/<pagebase>/index.html - each filter gallery (was <pagebase>.html)
stats/<pagebase>/<index>.html - each filter view page (was <pagebase>--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 <pagebase>/, the
gallery thumbnails link to sibling <index>.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 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/album.source.sh')
| -rw-r--r-- | src/lib/album.source.sh | 15 |
1 files changed, 9 insertions, 6 deletions
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/<pagebase>/ (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 |
