rssLimit bug fix

fix #380
This commit is contained in:
Choi Sung Hwan 2021-01-02 12:09:56 +09:00
parent 290800d19a
commit 2da8aab88f
1 changed files with 4 additions and 2 deletions

View File

@ -21,9 +21,11 @@
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{ if .IsHome }}
{{ $filteredPages := .Site.RegularPages }}
{{ $filteredPages := .Site.RegularPages | first $limit }}
{{ range $.Param "notAllowedTypesInHomeFeed" }}
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
{{ end }}
@ -68,7 +70,7 @@
{{ else }}
{{ range .Pages }}
{{ range (.Pages | first $limit) }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>