From 1d1f5fad9126c0e7fd037fe159b2bb52636cae5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 13 Nov 2022 14:36:12 +0100 Subject: [PATCH] rss: fix hidden special cases #382 --- layouts/_default/rss.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 92a699950b..68d2bf44a3 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -9,6 +9,7 @@ {{- if ge $limit 0 -}} {{- $pages = $pages | first $limit -}} {{- end }} +{{- $page := . }} {{- printf "" | safeHTML }} @@ -25,7 +26,8 @@ {{ printf "" .Permalink .MediaType | safeHTML }} {{- end -}} {{- range $pages }} - {{- if and .Permalink .Title (or (ne (.Scratch.Get "relearnIsHiddenNode") true) (ne .Site.Params.disableSeoHiddenPages true) ) }} + {{- $relearnIsHiddenFrom := index ($page.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} + {{- if and .Permalink .Title (or (not $relearnIsHiddenFrom) (ne .Site.Params.disableSeoHiddenPages true) ) }} {{ .Title }} {{ .Permalink }} @@ -36,7 +38,7 @@ {{ .Permalink }} {{ .Summary | html }} - {{- end }} + {{- end }} {{- end }} \ No newline at end of file