allow hiding post from RSS feed

This uses the `disable_feed` parameter from a post's frontmatter
This commit is contained in:
Bruno BELANYI 2021-01-18 21:08:07 +01:00
parent 723c94d0d4
commit d479fbd802

View File

@ -1,6 +1,6 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $pages := where $pctx.RegularPages ".Params.disable_feed" "!=" true -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}