Show authors ordered by number of posts

Hello everyone!

I 'm dreaming of having a floating box which shows authors ordered by the number of their posts and the number of their posts below.
Do you think this could be achieved?

I 'm using the story theme.

Thank you in advance for any helpful hints!

Which one?

1 Like

Getting pages by group and ordering by authors is in the docs.

https://gohugo.io/templates/lists/#by-parameter

After that you would probably have to write a standard sort algorithm. Off the top of my head, I’d range over the groupby for each other and then submit the pages to a partial which finds the biggest/smallest removes it from the collection and adds it to a scratch. After it’s done then you’d have them in order to range over for output.

1 Like

I’m using https://github.com/xaprb/story

Thank you!
That sounds difficult
I will try step-by-step.