From 75086bc831a5c1273f8fcbb400a9d07d07e6e592 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Mon, 26 Aug 2024 08:25:16 +0200 Subject: [PATCH] layouts: update author metadata - As `.Site.Author` is deprecated, I need to update the way this metadata is fetched from the site configuration file. Co-Authored-by: iGor milhit --- layouts/_default/rss.xml | 8 ++++---- layouts/partials/metadata.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index f469733..f1f1c2a 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -17,9 +17,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.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" }} @@ -30,7 +30,7 @@ {{ .Title }} {{ .Permalink }} {{ .PublishDate.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 }} {{ .Content | html }} diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 5d5ca53..d44a567 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -27,7 +27,7 @@ - + {{- if .IsNode }}