Add excluderss page parameter

This commit is contained in:
Will Faught
2022-12-13 21:45:07 -08:00
parent 2e1c02ddc6
commit 8e5faf8813
2 changed files with 6 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
{{ if .IsHome }}
{{ $item = .Site }}
{{ end }}
{{ if not .Params.excluderss }}
{{ $pages := slice }}
{{ if or $.IsHome $.IsSection }}
{{ $pages = $item.RegularPages }}
@@ -12,6 +13,7 @@
{{ if ge $limit 1 }}
{{ $pages = $pages | first $limit }}
{{ end }}
{{ $pages = where $pages "Params.excluderss" "ne" true }}
{{ $title := partial "paige-titles.html" . }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
@@ -65,3 +67,4 @@
{{ end }}
</channel>
</rss>
{{ end }}