tpl: Avoid "home page warning" in RSS template

See #6238
This commit is contained in:
Bjørn Erik Pedersen
2019-08-17 17:11:41 +02:00
parent 4b4bdcfe74
commit 564cf1bb11
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
{{- $pages := .Pages -}}
{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- end -}}
{{- $pages := "" -}}
{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}