Hugo v0.58.0 breaks RSS template.

Took it from
<904fd88714>.
This commit is contained in:
tastytea 2019-11-25 06:12:07 +01:00
parent cc435f269b
commit 55154ed5c4
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
{{- $page_context := cond .IsHome site . -}}
{{- $pages := $page_context.RegularPages -}}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
@ -20,7 +22,7 @@
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{- range .Data.Pages }}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>