Add postSections filter to RSS and Json Feed
This commit is contained in:
parent
6e47ef329e
commit
915e216f69
|
@ -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 -}}
|
||||
|
|
|
@ -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 -}}
|
||||
|
|
Reference in New Issue