Repository: gohugoio/hugo (language: go)

Issue:
.Site.Author deprecation is logged when .Site.Author not called in template
Reference: <https://discourse.gohugo.io/t/info-deprecated-site-author/48978/>



Discussion / hints:

Fix patch:
diff --git a/hugolib/site_new.go b/hugolib/site_new.go
index 97b46e3584e..59b97e887eb 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
 }
 


Test patch: