mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
hugolib: Formally deprecate .Page.NextPage .Page.PrevPage
Use .Page.Next and .Page.Prev instead.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
b72f909725
commit
7f82461407
@@ -16,6 +16,7 @@ package hugolib
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"github.com/gohugoio/hugo/common/hugo"
|
||||||
"github.com/gohugoio/hugo/lazy"
|
"github.com/gohugoio/hugo/lazy"
|
||||||
"github.com/gohugoio/hugo/resources/page"
|
"github.com/gohugoio/hugo/resources/page"
|
||||||
)
|
)
|
||||||
@@ -52,7 +53,9 @@ func (p pagePosition) Next() page.Page {
|
|||||||
return p.next()
|
return p.next()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Next instead.
|
||||||
func (p pagePosition) NextPage() page.Page {
|
func (p pagePosition) NextPage() page.Page {
|
||||||
|
hugo.Deprecate(".Page.NextPage", "Use .Page.Next instead.", "v0.123.0")
|
||||||
return p.Next()
|
return p.Next()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +63,9 @@ func (p pagePosition) Prev() page.Page {
|
|||||||
return p.prev()
|
return p.prev()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Prev instead.
|
||||||
func (p pagePosition) PrevPage() page.Page {
|
func (p pagePosition) PrevPage() page.Page {
|
||||||
|
hugo.Deprecate(".Page.PrevPage", "Use .Page.Prev instead.", "v0.123.0")
|
||||||
return p.Prev()
|
return p.Prev()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user