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 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'layouts/_partials') 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 -}} -{{ emojify ":calendar:" }} {{ emojify ":stopwatch:" }} {{ if $nonBreakingTags }}{{ emojify ":label:" }} {{ range $key, $val := $nonBreakingTags }}{{ if $key }} {{ end }}{{ $val | safeHTML }}{{ end }}{{ 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 "-" "‑" -}} + +{{ emojify ":calendar:" }} {{ emojify ":stopwatch:" }} {{ if where .Resources "MediaType.MainType" "audio" }}{{ emojify ":headphones:" }} {{ $nonBreakingAudioAvailable | safeHTML }}{{ end }}{{ if $nonBreakingTags }}{{ emojify ":label:" }} {{ range $key, $val := $nonBreakingTags }}{{ if $key }} {{ end }}{{ $val | safeHTML }}{{ end }}{{ end }} -- cgit v1.2.3