Reading through the Page Variables documentation it seems that .Prev
is deprecated, but .Next
is not. Is this an error in documentation or do I miss something that makes .Next
required?
Merely your perception of the passage of time.
Sorry, that’s not helpful, it’s just fun to read your question literally.
I am wondering the same thing. How can .Prev
be deprecated but not .Next
? What should you use instead of .Prev
anyway?
Yes, very funny
use .NextInSection and .PrevInSection
I have fixed the docs. Prev/Next is NOT deprecated and I just fixed the docs. There is a story to be told here, but I don’t have time right now.
Thank you for the clarification
The documentation at Page variables | Hugo now says:
.Next
Pointer to the next regular page (sorted by Hugo’s default sort). Example: {{if .NextPage}}{{.NextPage.Permalink}}{{end}}
I am wondering if I should use .Next
or .NextPage
and if the docs should be edited so that .Next and .NextPage are both documented?
Thanks for any more clarification about this!
PS - I think the “story to be told” that @bep mentioned is in .Next vs .NextInSection goes in opposite directions · Issue #1061 · gohugoio/hugo · GitHub
PPS - And of course it would be useful to also document .Prev and .PrevPage