mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-20 08:12:51 +00:00
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
This commit is contained in:
parent
27414d43a0
commit
e1917740af
|
@ -449,7 +449,9 @@ func (s *Site) Params() maps.Params {
|
||||||
|
|
||||||
// Deprecated: Use taxonomies instead.
|
// Deprecated: Use taxonomies instead.
|
||||||
func (s *Site) Author() map[string]any {
|
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
|
return s.conf.Author
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue