hugo-theme-mofo

Minimal theme for Hugo
git clone https://git.bracken.jp/hugo-theme-mofo.git
Log | Files | Refs | LICENSE

commit 69de2cf654c5f0e3fa4429f961730f1cfc7d11f0
parent 4b38934ad2229364f6f5aa351a4cf003f0cc9842
Author: Chris Bracken <chris@bracken.jp>
Date:   Sat,  8 Feb 2025 17:31:42 -0800

Migrate from .Site.Author to .Site.Params.Author

Avoids error:

.Site.Author was deprecated in Hugo v0.124.0 and subsequently removed.
Implement taxonomy 'author' or use .Site.Params.Author instead.

Diffstat:
Mlayouts/_default/rss.xml | 8++++----
Mlayouts/partials/footer.html | 2+-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml @@ -17,9 +17,9 @@ <link>{{ .Permalink }}</link> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} - <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} - <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} - <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }} + <webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{- with .OutputFormats.Get "RSS" -}} @@ -30,7 +30,7 @@ <title>{{ .Title }}</title> <link>{{ .Permalink }}</link> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> - {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + {{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}} <guid>{{ .Permalink }}</guid> <description>{{ .Content | html }}</description> </item> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html @@ -24,7 +24,7 @@ is {{- $current := now.Format "2006" }} {{- if ne .Site.Params.since $current }}{{ .Site.Params.since }}–{{ end }} {{- $current }}&nbsp; - {{- .Site.Author.name | safeHTML }}. + {{- .Site.Params.Author.name | safeHTML }}. {{- end }} </div> </footer>