jlelse
/
Indieroad
Archived
1
Fork 0

Add postSections filter to RSS and Json Feed

This commit is contained in:
Jan-Lukas Else 2020-05-13 10:43:15 +02:00
parent 6e47ef329e
commit 915e216f69
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,8 @@
{{- $pages = $pctx.RegularPages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- $postSections := ($.Param "postSections" | default (slice "posts")) }}
{{- $pages := ( where $pages "Type" "in" $postSections ) }}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}

View File

@ -7,6 +7,8 @@
{{- $pages = $pctx.RegularPages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- $postSections := ($.Param "postSections" | default (slice "posts")) }}
{{- $pages := ( where $pages "Type" "in" $postSections ) }}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}