Skip to content

Commit f51ad49

Browse files
committed
replace .Site with site & fix whitespace
1 parent ff7443b commit f51ad49

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

layouts/_default/rss.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@
3131
{{- end }}
3232

3333
{{- $pctx := . }}
34-
{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
34+
{{- if .IsHome }}{{ $pctx = site }}{{ end }}
3535
{{- $pages := slice }}
3636
{{- if or $.IsHome $.IsSection }}
3737
{{- $pages = $pctx.RegularPages }}
3838
{{- else }}
3939
{{- $pages = $pctx.Pages }}
4040
{{- end }}
41-
{{- $limit := .Site.Config.Services.RSS.Limit }}
41+
{{- $limit := site.Config.Services.RSS.Limit }}
4242
{{- if ge $limit 1 }}
4343
{{- $pages = $pages | first $limit }}
4444
{{- end }}
4545
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
4646
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
4747
<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>
4949
<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>
5151
{{- with site.Params.images }}
5252
<image>
5353
<title>{{ site.Title }}</title>
@@ -58,7 +58,7 @@
5858
<generator>Hugo -- gohugo.io</generator>
5959
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
6060
<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 }}
6262
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
6363
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
6464
{{- with .OutputFormats.Get "RSS" }}
@@ -78,6 +78,6 @@
7878
{{- end }}
7979
</item>
8080
{{- end }}
81-
{{ end }}
81+
{{- end }}
8282
</channel>
8383
</rss>

0 commit comments

Comments
 (0)