From 75afa9f0404c3b83ef543a2495a66e4badf010fe Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Tue, 4 Jan 2022 18:54:38 +0000 Subject: [PATCH] make the main page RSS feed sensitive to different content types --- layouts/_default/rss.xml | 49 ++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 7d893a7..efc3ec0 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -39,25 +39,40 @@ {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} - {{ if isset .Params "image" }} - {{ $cdnUrl := .Site.Params.blogCdnUrl }} - {{ with .Params.image }} - - {{ end }} - {{ end }} - - - {{` + {{ if isset .Params "enclosure" }} + {{ $cdnUrl := .Site.Params.podcastCdnUrl }} + + + {{`

{{end}} + {{ .Summary | safeHTML }} + ]]> +
+ + {{`

+ {{ .Content | safeHTML }} + ]]> +
+ {{ else }} {{ if isset .Params "image" }} - {{ $cdnUrl := .Site.Params.blogCdnUrl }} -

{{end}} - {{ .Summary | safeHTML }} - ]]> -
- + {{ $cdnUrl := .Site.Params.blogCdnUrl }} + {{ with .Params.image }}{{ end }} + {{ else }} + + {{ end }} + + {{`

{{ end }} + {{ .Summary | safeHTML }} + ]]> +
+ {{ end }} - {{ end }} + {{ end }} \ No newline at end of file