mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
hugolib: Formally deprecate .Page.NextPage .Page.PrevPage
Use .Page.Next and .Page.Prev instead.
This commit is contained in:
parent
b72f909725
commit
7f82461407
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,7 @@ package hugolib
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gohugoio/hugo/common/hugo"
|
||||
"github.com/gohugoio/hugo/lazy"
|
||||
"github.com/gohugoio/hugo/resources/page"
|
||||
)
|
||||
|
@ -52,7 +53,9 @@ func (p pagePosition) Next() page.Page {
|
|||
return p.next()
|
||||
}
|
||||
|
||||
// Deprecated: Use Next instead.
|
||||
func (p pagePosition) NextPage() page.Page {
|
||||
hugo.Deprecate(".Page.NextPage", "Use .Page.Next instead.", "v0.123.0")
|
||||
return p.Next()
|
||||
}
|
||||
|
||||
|
@ -60,7 +63,9 @@ func (p pagePosition) Prev() page.Page {
|
|||
return p.prev()
|
||||
}
|
||||
|
||||
// Deprecated: Use Prev instead.
|
||||
func (p pagePosition) PrevPage() page.Page {
|
||||
hugo.Deprecate(".Page.PrevPage", "Use .Page.Prev instead.", "v0.123.0")
|
||||
return p.Prev()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue