From 61890e0bd98262a55b3afff495ebfead33d76b96 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 17 Jun 2026 23:21:03 +0300 Subject: Add configurable SOURCE_URL footer link; release 0.9.0 The footer "Site generated ... with " was hardcoded to the shuriken.sh repository. Make it configurable via the SOURCE_URL config variable and the --source-url CLI flag (defaulting to the shuriken.sh repo, so existing sites are unchanged). The footer derives the displayed text from the URL by stripping its scheme. Plumbed through apply_config_defaults, CLI override targets/spec, --print-config, the verbose effective-config log, and the header template's new render_source_url_html (config_html) render var. Documented in shuriken.default.conf and README; added a generation test asserting a custom SOURCE_URL replaces the default footer link, and updated the print-config and header render-var-subset expectations. Co-Authored-By: Claude Opus 4.8 --- src/lib/template.source.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib/template.source.sh') diff --git a/src/lib/template.source.sh b/src/lib/template.source.sh index b5d3ad4..398e17d 100644 --- a/src/lib/template.source.sh +++ b/src/lib/template.source.sh @@ -190,6 +190,7 @@ declare -ra TEMPLATE_RENDER_FIELD_SPECS=( 'render_preview_thumbs_html|context_raw|preview_thumbs|preview_thumbs|previewpage' 'render_redirect_page_html|context_html|redirect_page|redirect_page|redirect' 'render_show_header_bar|context_raw|show_header_bar|show_header_bar|header' + 'render_source_url_html|config_html|SOURCE_URL||header' 'render_stats_body_html|context_raw|stats_body|stats_body|stats' 'render_stats_page_html|config_html|STATS_PAGE||header' 'render_tarball_include|tarball_include|||footer' @@ -605,6 +606,10 @@ prepare_template_render_var__config_html() { ORIGINAL_BASEPATH) context_value="$ORIGINAL_BASEPATH" ;; + SOURCE_URL) + # Always defaulted by apply_config_defaults (footer credit link). + context_value="${SOURCE_URL:-}" + ;; STATS_PAGE) # Always defaulted by apply_config_defaults; degrade to # "no" (link hidden) if somehow unset so the header bar -- cgit v1.2.3