From b3fbe78ca51685dcda85a4b72818ce5b4e3eda18 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sun, 17 Mar 2024 20:40:56 +0100 Subject: [PATCH] fix: deprecation warning for `.Site.Author` (#979) Fix deprecation warning for .Site.Author, deprecated in Hugo 0.124.0 --- exampleSite/{config.yaml => hugo.yaml} | 0 layouts/_default/rss.xml | 8 ++++---- netlify.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename exampleSite/{config.yaml => hugo.yaml} (100%) diff --git a/exampleSite/config.yaml b/exampleSite/hugo.yaml similarity index 100% rename from exampleSite/config.yaml rename to exampleSite/hugo.yaml diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index e9f3f1a..5874559 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -18,9 +18,9 @@ {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" -}} @@ -35,7 +35,7 @@ {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ with .Site.Params.Author.email }}{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}} diff --git a/netlify.toml b/netlify.toml index 9ad85f1..b7cd29f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,7 +2,7 @@ publish = "exampleSite/public" [build.environment] - HUGO_VERSION = "0.123.8" + HUGO_VERSION = "0.124.0" HUGO_THEME = "repo" [context.production]