unlisted posts should not show up in RSS either

main
rra 2023-06-19 11:51:53 +02:00
rodzic b5c24dcd1b
commit 08af6fea70
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -6,9 +6,12 @@
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $allposts := where .Site.RegularPages "Type" "in" "posts" -}}
{{- $notunlisted := where site.RegularPages ".Params.unlisted" "!=" "true" -}}
{{- $posts := $allposts | intersect $notunlisted -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- $pages = $posts | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
@ -40,7 +43,6 @@
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}