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
Sorting authors by name instead of date in people widget #1080
Comments
I am still debugging to figure out the sorting logics. I have realized that all the first authors, before Anat, have a published content each (a talk, to be more specific). Others do not have any talk. If I unlink the first author with the talk, it gets moved where it should belong: alphabetically sorted by name. However, a part from that, it is not clear what kind of sorting follow the authors who have talk, as they do not follow alphabetical order. Edit: I found out that authors are sorted according to linked content's date, on a descending order. IMHO this is not an expected/obvious behaviour. |
I have also discovered that my suggestion of ordering authors by weight is already implemented by default in Hugo (see Would it be possible to arrange authors by |
The override order is defined by Hugo team, so that would be a question for them. Defining a 'weight' for each author is Hugo's method for allowing admins to customize the order. We could force sorting by display name in People widget, but it might not be very helpful as for western names, that would usually order by first name. |
Adding a weight variable for each author (content/author/author1/_index.md) has no effect on ordering for me... This is using hugo v0.55.6. Any idea why? |
@nfaivre, I added |
Can we have a solution as follows
This would make it easier to add new people w/o worrying about ordering and order them based on whatever criteria we want. |
Authors on people widget are sorted randomly (or I cannot see a clear pattern). Even though they were sorted alphabetically, when adding new people (I have a staff of 11 people that I want to display on the widget) the sorting criteria changed.
This makes me wonder that it would be a nice have to, to implement a similar approach to other widgets in terms of choosing the sorting criteria, and possibly adding a new
author_weight
field for a custom sorting.The text was updated successfully, but these errors were encountered: