Skip to content

Commit

Permalink
hugolib: Make .Site.Author deprecation warning clearer
Browse files Browse the repository at this point in the history
Fixes #12269
  • Loading branch information
jvns authored and bep committed Oct 14, 2024
1 parent 41f69a7 commit 5bb22b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hugolib/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,20 +511,20 @@ func (s *Site) Params() maps.Params {
// Deprecated: Use taxonomies instead.
func (s *Site) Author() map[string]any {
if len(s.conf.Author) != 0 {
hugo.Deprecate(".Site.Author", "Use taxonomies instead.", "v0.124.0")
hugo.Deprecate(".Site.Author", "Implement taxonomy 'author' or use .Site.Params.Author instead.", "v0.124.0")
}
return s.conf.Author
}

// Deprecated: Use taxonomies instead.
func (s *Site) Authors() page.AuthorList {
hugo.Deprecate(".Site.Authors", "Use taxonomies instead.", "v0.124.0")
hugo.Deprecate(".Site.Authors", "Implement taxonomy 'authors' or use .Site.Params.Author instead.", "v0.124.0")
return page.AuthorList{}
}

// Deprecated: Use .Site.Params instead.
func (s *Site) Social() map[string]string {
hugo.Deprecate(".Site.Social", "Use .Site.Params instead.", "v0.124.0")
hugo.Deprecate(".Site.Social", "Implement taxonomy 'social' or use .Site.Params.Social instead.", "v0.124.0")
return s.conf.Social
}

Expand Down

0 comments on commit 5bb22b6

Please sign in to comment.