Skip to content

Commit b3fbe78

Browse files
authored
fix: deprecation warning for .Site.Author (CaiJimmy#979)
Fix deprecation warning for .Site.Author, deprecated in Hugo 0.124.0
1 parent 2cb5ba6 commit b3fbe78

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
File renamed without changes.

layouts/_default/rss.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<link>{{ .Permalink }}</link>
1919
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
2020
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
21-
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
22-
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
23-
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
21+
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
22+
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
23+
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
2424
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
2525
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
2626
{{- with .OutputFormats.Get "RSS" -}}
@@ -35,7 +35,7 @@
3535
<title>{{ .Title }}</title>
3636
<link>{{ .Permalink }}</link>
3737
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
38-
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
38+
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
3939
<guid>{{ .Permalink }}</guid>
4040
<description>
4141
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
publish = "exampleSite/public"
33

44
[build.environment]
5-
HUGO_VERSION = "0.123.8"
5+
HUGO_VERSION = "0.124.0"
66
HUGO_THEME = "repo"
77

88
[context.production]

0 commit comments

Comments
 (0)