summaryrefslogtreecommitdiffstats
path: root/resources/page/site.go
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2024-03-12 11:16:05 -0700
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-03-15 17:26:45 +0100
commitd4d49e0f0ec53ef7e105c51b5c6fd198c86acb7e (patch)
tree886d5118def4fe3fe5bb5c293740d898be39b638 /resources/page/site.go
parent78178d0c2a10e7793a41f8f66b3a4a6e4f70ef7e (diff)
hugolib: Deprecate site methods Author, Authors, and Social
Closes #12228
Diffstat (limited to 'resources/page/site.go')
-rw-r--r--resources/page/site.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/resources/page/site.go b/resources/page/site.go
index 8f268091f..df33485eb 100644
--- a/resources/page/site.go
+++ b/resources/page/site.go
@@ -108,13 +108,13 @@ type Site interface {
// Returns the site config.
Config() SiteConfig
- // Author is deprecated and will be removed in a future release.
+ // Deprecated: Use taxonomies instead.
Author() map[string]interface{}
- // Authors is deprecated and will be removed in a future release.
+ // Deprecated: Use taxonomies instead.
Authors() AuthorList
- // Returns the social links for this site.
+ // Deprecated: Use .Site.Params instead.
Social() map[string]string
// Deprecated: Use Config().Services.GoogleAnalytics instead.
@@ -165,16 +165,19 @@ func (s *siteWrapper) Key() string {
return s.s.Language().Lang
}
+// // Deprecated: Use .Site.Params instead.
func (s *siteWrapper) Social() map[string]string {
return s.s.Social()
}
+// Deprecated: Use taxonomies instead.
func (s *siteWrapper) Author() map[string]interface{} {
return s.s.Author()
}
+// Deprecated: Use taxonomies instead.
func (s *siteWrapper) Authors() AuthorList {
- return AuthorList{}
+ return s.s.Authors()
}
// Deprecated: Use .Site.Config.Services.GoogleAnalytics.ID instead.
@@ -321,14 +324,17 @@ type testSite struct {
l *langs.Language
}
+// Deprecated: Use taxonomies instead.
func (s testSite) Author() map[string]interface{} {
return nil
}
+// Deprecated: Use taxonomies instead.
func (s testSite) Authors() AuthorList {
return AuthorList{}
}
+// Deprecated: Use .Site.Params instead.
func (s testSite) Social() map[string]string {
return make(map[string]string)
}