|
31 | 31 | {{- end }} |
32 | 32 |
|
33 | 33 | {{- $pctx := . }} |
34 | | -{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} |
| 34 | +{{- if .IsHome }}{{ $pctx = site }}{{ end }} |
35 | 35 | {{- $pages := slice }} |
36 | 36 | {{- if or $.IsHome $.IsSection }} |
37 | 37 | {{- $pages = $pctx.RegularPages }} |
38 | 38 | {{- else }} |
39 | 39 | {{- $pages = $pctx.Pages }} |
40 | 40 | {{- end }} |
41 | | -{{- $limit := .Site.Config.Services.RSS.Limit }} |
| 41 | +{{- $limit := site.Config.Services.RSS.Limit }} |
42 | 42 | {{- if ge $limit 1 }} |
43 | 43 | {{- $pages = $pages | first $limit }} |
44 | 44 | {{- end }} |
45 | 45 | {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} |
46 | 46 | <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
47 | 47 | <channel> |
48 | | - <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title> |
| 48 | + <title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title> |
49 | 49 | <link>{{ .Permalink }}</link> |
50 | | - <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description> |
| 50 | + <description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</description> |
51 | 51 | {{- with site.Params.images }} |
52 | 52 | <image> |
53 | 53 | <title>{{ site.Title }}</title> |
|
58 | 58 | <generator>Hugo -- gohugo.io</generator> |
59 | 59 | <language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }} |
60 | 60 | <managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }} |
61 | | - <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }} |
| 61 | + <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }} |
62 | 62 | <copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }} |
63 | 63 | <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} |
64 | 64 | {{- with .OutputFormats.Get "RSS" }} |
|
78 | 78 | {{- end }} |
79 | 79 | </item> |
80 | 80 | {{- end }} |
81 | | - {{ end }} |
| 81 | + {{- end }} |
82 | 82 | </channel> |
83 | 83 | </rss> |
0 commit comments