From: Joe Mooring Date: Fri, 22 Mar 2024 20:02:56 +0000 (-0700) Subject: hugolib: Conditionally suppress .Site.Author deprecation notice X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e1917740afe3fd08d1948947e25eff55e2c10d98;p=brevno-suite%2Fhugo hugolib: Conditionally suppress .Site.Author deprecation notice Suppress the .Site.Author deprecation notice unless the Author key is present and not empty in the site configuration. Closes #12297 --- diff --git a/hugolib/site_new.go b/hugolib/site_new.go index 97b46e358..59b97e887 100644 --- a/hugolib/site_new.go +++ b/hugolib/site_new.go @@ -449,7 +449,9 @@ func (s *Site) Params() maps.Params { // Deprecated: Use taxonomies instead. func (s *Site) Author() map[string]any { - hugo.Deprecate(".Site.Author", "Use taxonomies instead.", "v0.124.0") + if len(s.conf.Author) != 0 { + hugo.Deprecate(".Site.Author", "Use taxonomies instead.", "v0.124.0") + } return s.conf.Author }