mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Remove deprecations <= v0.122.0 (note)
These have, once we release this, been logging ERROR for 6 minor versions.
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
package page
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"time"
|
||||
|
||||
"github.com/gohugoio/hugo/common/maps"
|
||||
@@ -54,9 +53,6 @@ type Site interface {
|
||||
// A shortcut to the home
|
||||
Home() Page
|
||||
|
||||
// Deprecated: Use hugo.IsServer instead.
|
||||
IsServer() bool
|
||||
|
||||
// Returns the server port.
|
||||
ServerPort() int
|
||||
|
||||
@@ -117,12 +113,6 @@ type Site interface {
|
||||
// Deprecated: Use .Site.Params instead.
|
||||
Social() map[string]string
|
||||
|
||||
// Deprecated: Use Config().Services.GoogleAnalytics instead.
|
||||
GoogleAnalytics() string
|
||||
|
||||
// Deprecated: Use Config().Privacy.Disqus instead.
|
||||
DisqusShortname() string
|
||||
|
||||
// BuildDrafts is deprecated and will be removed in a future release.
|
||||
BuildDrafts() bool
|
||||
|
||||
@@ -132,9 +122,6 @@ type Site interface {
|
||||
// LanguagePrefix returns the language prefix for this site.
|
||||
LanguagePrefix() string
|
||||
|
||||
// Deprecated: Use .Site.Home.OutputFormats.Get "rss" instead.
|
||||
RSSLink() template.URL
|
||||
|
||||
maps.StoreProvider
|
||||
|
||||
// For internal use only.
|
||||
@@ -195,11 +182,6 @@ func (s *siteWrapper) Authors() AuthorList {
|
||||
return s.s.Authors()
|
||||
}
|
||||
|
||||
// Deprecated: Use .Site.Config.Services.GoogleAnalytics.ID instead.
|
||||
func (s *siteWrapper) GoogleAnalytics() string {
|
||||
return s.s.GoogleAnalytics()
|
||||
}
|
||||
|
||||
func (s *siteWrapper) GetPage(ref ...string) (Page, error) {
|
||||
return s.s.GetPage(ref...)
|
||||
}
|
||||
@@ -232,11 +214,6 @@ func (s *siteWrapper) Home() Page {
|
||||
return s.s.Home()
|
||||
}
|
||||
|
||||
// Deprecated: Use hugo.IsServer instead.
|
||||
func (s *siteWrapper) IsServer() bool {
|
||||
return s.s.IsServer()
|
||||
}
|
||||
|
||||
func (s *siteWrapper) ServerPort() int {
|
||||
return s.s.ServerPort()
|
||||
}
|
||||
@@ -315,20 +292,10 @@ func (s *siteWrapper) IsMultiLingual() bool {
|
||||
return s.s.IsMultiLingual()
|
||||
}
|
||||
|
||||
// Deprecated: Use .Site.Config.Services.Disqus.Shortname instead.
|
||||
func (s *siteWrapper) DisqusShortname() string {
|
||||
return s.s.DisqusShortname()
|
||||
}
|
||||
|
||||
func (s *siteWrapper) LanguagePrefix() string {
|
||||
return s.s.LanguagePrefix()
|
||||
}
|
||||
|
||||
// Deprecated: Use .Site.Home.OutputFormats.Get "rss" instead.
|
||||
func (s *siteWrapper) RSSLink() template.URL {
|
||||
return s.s.RSSLink()
|
||||
}
|
||||
|
||||
func (s *siteWrapper) Store() *maps.Scratch {
|
||||
return s.s.Store()
|
||||
}
|
||||
@@ -416,20 +383,10 @@ func (t testSite) Languages() langs.Languages {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Use .Site.Config.Services.GoogleAnalytics.ID instead.
|
||||
func (t testSite) GoogleAnalytics() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (t testSite) MainSections() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Use hugo.IsServer instead.
|
||||
func (t testSite) IsServer() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (t testSite) Language() *langs.Language {
|
||||
return t.l
|
||||
}
|
||||
@@ -474,11 +431,6 @@ func (s testSite) Config() SiteConfig {
|
||||
return SiteConfig{}
|
||||
}
|
||||
|
||||
// Deprecated: Use .Site.Config.Services.Disqus.Shortname instead.
|
||||
func (testSite) DisqusShortname() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (s testSite) BuildDrafts() bool {
|
||||
return false
|
||||
}
|
||||
@@ -492,11 +444,6 @@ func (s testSite) Param(key any) (any, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Deprecated: Use .Site.Home.OutputFormats.Get "rss" instead.
|
||||
func (s testSite) RSSLink() template.URL {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (s testSite) Store() *maps.Scratch {
|
||||
return maps.NewScratch()
|
||||
}
|
||||
|
Reference in New Issue
Block a user