From d86964f33fce2b839c4fd38e24a351cf5518044f Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Mon, 15 Jan 2024 13:39:27 -0600 Subject: [PATCH] rss: alternate approach to image embeds --- layouts/_default/rss.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index e44d174..e1f9961 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -10,7 +10,7 @@ {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} -{{- printf "" | safeHTML }} + {{ .LinkTitle }}{{ end }} {{ .Permalink }} - {{ " - {{ " + {{- $content := replaceRE "a href=\"(#.*?)\"" (printf "%s%s%s" "a href=\"" .Permalink "$1\"") .Content -}} + {{- $content = replaceRE "img src=\"(.*?)\"" (printf "%s%s%s" "img src=\"" .Permalink "$1\"") $content -}} + {{ $content | html }} {{ end }}