From a4a0f8dcfb4ec6b55ce172f0addac3845f6de05b Mon Sep 17 00:00:00 2001 From: David Amador Date: Sat, 3 Feb 2024 15:25:52 +0000 Subject: [PATCH] Adding xmlns:content namespace to RSS feed and only write content:encoded if something on .Content (#1411) * Added xmlns:content namespace for valid RSS feeds with content:encoded * Only write in RSS if ShotFullTextinRSS and .Content has something fixes: #1385 --- layouts/_default/rss.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index b6a7ec0..342986d 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -43,7 +43,7 @@ {{- $pages = $pages | first $limit }} {{- end }} {{- printf "" | safeHTML }} - + {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} {{ .Permalink }} @@ -73,7 +73,7 @@ {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} {{ .Permalink }} {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} - {{- if site.Params.ShowFullTextinRSS }} + {{- if and site.Params.ShowFullTextinRSS .Content }} {{ (printf "" .Content) | safeHTML }} {{- end }}