-
Hi, I created an academic webpage for my research group. I have a list of students in a group, and by default, they are sorted alphabetically using the first name. Is there a way to sort authors in a group by the last name instead? Thanks! -Gaston |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
It's not straightforward! It requires some changes to the Firstly
Now add the parameter The sort is by default ascending, so weights have to reflect that. Let's say you have I would recommend using weights that differ by more than 1, so you can add more people later without having to change all the weights. |
Beta Was this translation helpful? Give feedback.
It's not straightforward! It requires some changes to the
people.html
partial and all thepeople
displayed on your website.Firstly
people.html
:./layouts/partials/widgets/
. Create the missing folders.{{ range $query }}
to{{ range sort $query "Weight" }}
Changing this line will sort the people within each group by the parameter
weight
.Now add the parameter
weight
to all the people (authors) defined for your website.For author
<johndoe>
add the parameter to./content/authors/<johndoe>/_index.md
The sort is by default ascending, so weight…