From c373f45313451f3bcc0a98a3697e192536d8c6c0 Mon Sep 17 00:00:00 2001 From: Gottfried Mayer Date: Thu, 10 Oct 2024 13:19:14 +0200 Subject: [PATCH] fix: exclude pages with "xml" = false or "externalUrl" that starts with http/https --- 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 eab240932..52db536d7 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -27,7 +27,7 @@ {{- with .OutputFormats.Get "RSS" -}} {{ printf "" .Permalink .MediaType | safeHTML }} {{- end -}} - {{ range $pages }} + {{ range $pages }}{{ if and (.Param "xml" | default true) (or (not .Params.externalUrl) (and (.Params.externalUrl) (and (not (hasPrefix .Params.externalUrl "http://")) (not (hasPrefix .Params.externalUrl "https://"))))) }} {{ .Title }} {{ .Permalink }} @@ -44,6 +44,6 @@ {{- end -}} {{ end }} - {{ end }} + {{ end }}{{ end }}