-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next/NextInSection and Prev/PrevInSection are flipped? #12776
Comments
I have had this issue reported ... 100s of times before, which is why that line is in the documentation. I can add that that the original implementation went in the other direction (the way you want it), but that was reported as a bug, I agreed, and we spent 100 hours on a deprecation cycle to change the meaning. The odds of us doing that again now, with even some more thousands of Hugo sites in the wild is ... close to zero, so I'm closing this issue. The current behaviour comes from Hugo's default page sort when no weight is set: Date descending (newest first), so next goes correctly to the next when you look at it sorted from newest to oldest, but it goes back in time. Anyhow, even if we wanted to (I don't), we cannot change this. You can use https://gohugo.io/methods/page/next/ instead if you want. |
Thanks for the reply. I can understand why you don't want to change the
default as this would be an issue for existing sites. Have you considered
having a config setting for the sort order? There are many circumstances
where you might want it to work differently e.g. if you have a table of
contents for a book or topic that is sorted by weight. And it seems odd to
have something in the docs that saying it acts in an unexpected way.
…On Fri, 16 Aug 2024 at 10:30, Bjørn Erik Pedersen ***@***.***> wrote:
I have had this issue reported ... 100s of times before, which is why that
line is in the documentation. I can add that that the original
implementation went in the other direction (the way you want it), but that
was reported as a bug, I agreed, and we spent 100 hours on a deprecation
cycle to change the meaning. The odds of us doing that again now, with even
some more thousands of Hugo sites in the wild is ... close to zero, so I'm
closing this issue.
The current behaviour comes from Hugo's default page sort when no weight
is set: Date descending (newest first), so *next* goes correctly to the
*next* when you look at it sorted from newest to oldest, but it goes back
in time.
Anyhow, even if we wanted to (I don't), we cannot change this.
You can use https://gohugo.io/methods/page/next/ instead if you want.
—
Reply to this email directly, view it on GitHub
<#12776 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJE32MCXGHIZAZX6QNIVNLZRXBBRAVCNFSM6AAAAABMTV5Z5GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGE3DKOJUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This was previously reported as issue #9158 and apparently closed as resolved. However it is clearly not resolved.
I have a contents page which sorts things in order of the page weight. I would expect the next page to be the next one in the contents but it isn't it is the previous one; and vice versa.
Even the docs say
Surely the intuitive thing is to behave as people expect rather than putting such a comment in the docs?
The text was updated successfully, but these errors were encountered: