Merge pull request #77 from Ambroisie/add-rss-disable-feature

Allow hiding posts from RSS feed
This commit is contained in:
Dmitry Kolosov 2021-01-24 13:40:34 +03:00 committed by GitHub
commit b43d933019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

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 -}}
@ -31,4 +31,4 @@
</item>
{{ end }}
</channel>
</rss>
</rss>