summaryrefslogtreecommitdiff
path: root/src/lib/process.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-27 22:43:42 +0300
committerPaul Buetow <paul@buetow.org>2026-06-27 22:43:42 +0300
commit2a79fd67e8a29e4e37cda38acd9390c5f4594dc2 (patch)
treecee8e472abb3db6b6451f7d3fed83fad7c652b3d /src/lib/process.source.sh
parent75925e88fe6f15519490d37e79c93eaa2a3b12aa (diff)
rr0: data-driven config_html via indirect expansion of source_name
Replace the hardcoded per-name case in prepare_template_render_var__config_html (HEIGHT/MAXPREVIEWS/ ORIGINAL_BASEPATH/SOURCE_URL/STATS_PAGE/THUMBHEIGHT/TITLE) with a single indirect read of the spec's source_name: context_value=${!source_name-}. The handler is now fully data-driven and never needs editing when a new config render-var is added (Open/Closed), matching the module's spec-driven dispatch. source_name is already passed to every handler by prepare_template_render_vars, so no dispatch contract changed. Output is byte-identical for all reachable states: apply_config_defaults always runs before render (HEIGHT/ORIGINAL_BASEPATH/SOURCE_URL/STATS_PAGE/ TITLE always set, so the old defensive :- fallbacks like STATS_PAGE :-no were unreachable), and the unset-safe '-' default reproduces the empty result for refresh-only MAXPREVIEWS/THUMBHEIGHT. Dropping the literal ${TITLE:-} re-surfaced a previously-suppressed SC2153 on $TITLE in generation-metadata.source.sh (lowercase 'title' locals in the stats modules); add a targeted shellcheck disable there. Regenerated bin/shuriken. just test/shellcheck/check-generated all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/process.source.sh')
0 files changed, 0 insertions, 0 deletions