mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Revise the deprecation strategy
Git users and theme authors two Hugo releases to fix: 1. With a visible warning 2. Then with an ERROR that exits with -1 Fixes #2726
This commit is contained in:
@@ -242,18 +242,18 @@ type PageMeta struct {
|
||||
}
|
||||
|
||||
func (*PageMeta) WordCount() int {
|
||||
helpers.Deprecated("PageMeta", "WordCount", ".WordCount (on Page)")
|
||||
helpers.Deprecated("PageMeta", "WordCount", ".WordCount (on Page)", true)
|
||||
return 0
|
||||
}
|
||||
|
||||
func (*PageMeta) FuzzyWordCount() int {
|
||||
helpers.Deprecated("PageMeta", "FuzzyWordCount", ".FuzzyWordCount (on Page)")
|
||||
helpers.Deprecated("PageMeta", "FuzzyWordCount", ".FuzzyWordCount (on Page)", true)
|
||||
return 0
|
||||
|
||||
}
|
||||
|
||||
func (*PageMeta) ReadingTime() int {
|
||||
helpers.Deprecated("PageMeta", "ReadingTime", ".ReadingTime (on Page)")
|
||||
helpers.Deprecated("PageMeta", "ReadingTime", ".ReadingTime (on Page)", true)
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -1565,7 +1565,7 @@ func (p *Page) Hugo() *HugoInfo {
|
||||
|
||||
func (p *Page) RSSlink() template.HTML {
|
||||
// TODO(bep) we cannot have two of these
|
||||
helpers.Deprecated(".Page", "RSSlink", "RSSLink")
|
||||
helpers.Deprecated(".Page", "RSSlink", "RSSLink", false)
|
||||
return p.RSSLink
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user