diff --git a/hugolib/page__position.go b/hugolib/page__position.go index d977a7052..d55ebeb07 100644 --- a/hugolib/page__position.go +++ b/hugolib/page__position.go @@ -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() }