-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
ByLinkTitle seemingly sorts by date if link title not explicitly set #4953
Comments
I just checked the code, and it sorts by I would expect it to sort by |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
I don't believe this bug has been fixed. |
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. |
I have a bunch of content in my Hugo site that I'm sorting by link title in a list template (using
.Data.Pages.ByLinkTitle
). However,.ByLinkTitle
appears to not work as documented; it appears to be sorting by date order..ByTitle
works as expected. All of the content being sorted does not have an explicit link title set, but they do all have titles set in the front matter. I'm able to reproduce this on Hugo 0.44.The site source is here, you can reproduce by changing this line of layouts/commands/list.html to use
.ByLinkTitle
and seeing the effects on/cmd/
. Let me know if you need a more minimal reproduction case.Based on examining the Hugo source briefly, what I'm suspecting here is that
Page.linkTitle
is not being set correctly to the implicit default of title when considering for sort, but I couldn't confirm this with certainty.The text was updated successfully, but these errors were encountered: