aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2024-03-12 11:16:05 -0700
committerBjørn Erik Pedersen <[email protected]>2024-03-15 17:26:45 +0100
commitd4d49e0f0ec53ef7e105c51b5c6fd198c86acb7e (patch)
tree886d5118def4fe3fe5bb5c293740d898be39b638 /hugolib
parent78178d0c2a10e7793a41f8f66b3a4a6e4f70ef7e (diff)
downloadhugo-d4d49e0f0ec53ef7e105c51b5c6fd198c86acb7e.tar.gz
hugo-d4d49e0f0ec53ef7e105c51b5c6fd198c86acb7e.zip
hugolib: Deprecate site methods Author, Authors, and Social
Closes #12228
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/page__meta.go8
-rw-r--r--hugolib/site_new.go6
2 files changed, 10 insertions, 4 deletions
diff --git a/hugolib/page__meta.go b/hugolib/page__meta.go
index 8c148923d..7ab904357 100644
--- a/hugolib/page__meta.go
+++ b/hugolib/page__meta.go
@@ -106,9 +106,9 @@ func (p *pageMeta) Aliases() []string {
return p.pageConfig.Aliases
}
-// Deprecated: use taxonomies.
+// Deprecated: Use taxonomies instead.
func (p *pageMeta) Author() page.Author {
- hugo.Deprecate(".Author", "Use taxonomies.", "v0.98.0")
+ hugo.Deprecate(".Page.Author", "Use taxonomies instead.", "v0.98.0")
authors := p.Authors()
for _, author := range authors {
@@ -117,9 +117,9 @@ func (p *pageMeta) Author() page.Author {
return page.Author{}
}
-// Deprecated: use taxonomies.
+// Deprecated: Use taxonomies instead.
func (p *pageMeta) Authors() page.AuthorList {
- hugo.Deprecate(".Author", "Use taxonomies.", "v0.112.0")
+ hugo.Deprecate(".Page.Authors", "Use taxonomies instead.", "v0.112.0")
return nil
}
diff --git a/hugolib/site_new.go b/hugolib/site_new.go
index 21d5ace96..97b46e358 100644
--- a/hugolib/site_new.go
+++ b/hugolib/site_new.go
@@ -447,15 +447,21 @@ func (s *Site) Params() maps.Params {
return s.conf.Params
}
+// Deprecated: Use taxonomies instead.
func (s *Site) Author() map[string]any {
+ hugo.Deprecate(".Site.Author", "Use taxonomies 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")
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")
return s.conf.Social
}