Having been a Lotus Notes/Domino developer for almost two decades my love in views seems to be in-curable. As Notes is dying, the hunt for an alternative has set in. Fortunately Hugo seems to offer a lot of similar features. Even categorized views, which is implemented in my new website migrated from Lotus Notes inspired by a comment from tryjigs.
Now I try to get my head around switching sort order for documents with the same term. Just like the option to sort a search result in this forum by date, relevance etc.
I understand the concept of nodes in Hugo the way, that a node is a node is a node. Documents with a certain term can only be listed in one way (they are born with only one route). If I'm not wrong here, I have to hack a little and put the same term in two different taxonomies in order to create two templates with different sort order of the same document collection.
So far so good.
Next challenge is, that I'm going for a pure "ByDate.Reverse" layout and a pure "ByWeight" layout of the same documents. In order to accomplish that, "weight" has to be present in front matter.
But this is not good - at least according to the docs:
By default, content is ordered by weight, then by date with the most recent date first, but alternative sorting (by title and linktitle) is also available.
Unweighted pages appear at the end of the list. If no weights are provided (or if weights are the same), date will be used to sort. If neither is provided, content will be ordered based on how it’s read off the disk, and no order is guaranteed.
As I read it, a node sorted "ByDate" will always be influenced by the documents weight - if present in front matter. And I need that to be the case, as weight is required for the other node, which is intended to be sorted by weight.
Have I missed something?
If not, then I would like to suggest a consequent separation of "ByDate" and "Weight" in nodes as a feature request.