From 151b5149973594233512d27dba434184665e398827f7da361a644501a16b1e58 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson <> Date: Sun, 6 Sep 2026 00:00:00 +0000 Subject: Add audio support for entries on website --- layouts/_partials/pageinfo.html | 7 ++++++- layouts/single.html | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'layouts') diff --git a/layouts/_partials/pageinfo.html b/layouts/_partials/pageinfo.html index 9d60ea6..47f1194 100644 --- a/layouts/_partials/pageinfo.html +++ b/layouts/_partials/pageinfo.html @@ -20,4 +20,9 @@ {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag -}} {{ end -}} -{{ if $nonBreakingTags }}{{ end }} +{{/* user-overridable parameter $audioAvailable is escaped pre-insertion so that HTML entities can be inserted */ -}} +{{ $nonBreakingAudioAvailable := i18n "audioAvailable" .Title | htmlEscape -}} +{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable " " " " -}} +{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable "-" "‑" -}} + +{{ if where .Resources "MediaType.MainType" "audio" }}{{ end }}{{ if $nonBreakingTags }}{{ end }} diff --git a/layouts/single.html b/layouts/single.html index 9a8c8ae..e7522a0 100644 --- a/layouts/single.html +++ b/layouts/single.html @@ -7,6 +7,12 @@
{{ partial "pageinfo.html" . }}
+ {{- end -}} + {{ with index (where .Resources "MediaType.MainType" "audio") 0 }} + {{- end }} {{ chomp (.Content) }} -- cgit v1.2.3