allow hiding post from RSS feed
This uses the `disable_feed` parameter from a post's frontmatter
This commit is contained in:
parent
723c94d0d4
commit
d479fbd802
1 changed files with 2 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue