summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2024-03-22 13:02:56 -0700
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-03-26 10:28:03 +0100
commite1917740afe3fd08d1948947e25eff55e2c10d98 (patch)
treecaa3e6b4e2cd72601ac7048fd89832627fbd6d08
parent27414d43a07026fe94f0e3c5ca3e69a4b1c8f2e4 (diff)
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
-rw-r--r--hugolib/site_new.go4
1 files changed, 3 insertions, 1 deletions
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
}