Add refine rss build logic

This commit is contained in:
James Ray 2022-02-28 15:32:21 -05:00
parent 711d4c7749
commit c3c7351089
No known key found for this signature in database
GPG key ID: E8AD82EF4759BD72

View file

@ -1,10 +1,12 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- if $.IsHome -}}
{{- $pages = $pctx.RegularPages -}}
{{- else if $.IsSection -}}
{{- $pages = $pctx.RegularPagesRecursive -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- $pages = $pctx.RegularPagesRecursive -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}