fix(RSS): page context selection
This commit is contained in:
parent
24cd07589b
commit
9dbc0a4f38
@ -1,5 +1,13 @@
|
|||||||
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
{{- $pctx := . -}}
|
||||||
{{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}}
|
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||||
|
{{- $pages := slice -}}
|
||||||
|
{{- if or $.IsHome $.IsSection -}}
|
||||||
|
{{- $pages = $pctx.RegularPages -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $pages = $pctx.Pages -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $pages := where $pages "Type" "in" .Site.Params.mainSections -}}
|
||||||
|
{{- $notHidden := where $pages "Params.hidden" "!=" true -}}
|
||||||
{{- $filtered := ($pages | intersect $notHidden) -}}
|
{{- $filtered := ($pages | intersect $notHidden) -}}
|
||||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||||
{{- if ge $limit 1 -}}
|
{{- if ge $limit 1 -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user