diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 5a6386f..f151df5 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,15 +1,15 @@ -{{- $pctx := . -}} -{{- if .IsHome -}}{{ $pctx = site }}{{- end -}} -{{- $pages := slice -}} -{{- if or $.IsHome $.IsSection -}} -{{- $pages = where $pctx.RegularPages "Type" "in" site.Params.mainSections }} -{{- else -}} -{{- $pages = $pctx.Pages -}} -{{- end -}} +{{- $pages := .Pages -}} +{{- if $.IsHome -}} + {{/* get all regular pages instead of pages in a section */}} + {{- $pages = where site.RegularPages "Section" "in" site.Params.mainSections -}} +{{- end }} +{{- $pages = where $pages "Params.hidden" "!=" true -}} + {{- $limit := site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} + {{- printf "" | safeHTML }}