Ability to configure default page ordering

Configure Hugo | Hugo says that the default page order for Page.Next/Page.Prev/Page.NextInSection/Page.PrevInSection sorts by weight, then date, then link title, then path. However, it appears that all these orderings share the same “direction” (asc or desc). It defaults to desc, but you can change it to asc for Page.Next/Page.Prev and Page.NextInSection/Page.PrevInSection independently of the other:

page:
  nextPrevSortOrder: "desc"
  nextPrevInSectionSortOrder: "desc"

That’s fine, however, I would like control over the direction of each field sorting. Since weights are sorted descending by default, if you weight all pages, and add pages over time to the end of the page list, then you have to make all weights negative, and each new page has a more and more negative weight value, e.g. -1, -2, -3. This seems unintuitive. I would expect the weights to progress as 1, 2, 3.

I can write my own ordering logic in my own theme that accomplishes this (and I have), of course, but that forces my own preference on all my theme’s users. It would be better to allow users to configure their own orders in Hugo outside of modules.

I propose adding these options for configuring the sorting of Page.Next/Page.Prev/Page.NextInSection/Page.PrevInSection:

page:
  nextPrevSortFields: ["Weight", "Date", "LinkTitle", "Path"] # Default value
  nextPrevSortDirections: {"Weight": "desc", "Date": "desc", "LinkTitle": "desc", "Path": "desc"} # Default value. Invalid to set along with nextPrevSortOrder; nextPrevSortOrder basically sets these all to "asc" or "desc"
  nextPrevInSectionSortFields: ["Weight", "Date", "LinkTitle", "Path"] # Default value
  nextPrevInSectionSortDirections: {"Weight": "desc", "Date": "desc", "LinkTitle": "desc", "Path": "desc"} # Default value. Invalid to set along with nextPrevInSectionSortOrder; nextPrevInSectionSortOrder basically sets these all to "asc" or "desc"

I propose adding these options for configuring the sorting of Page.Pages:

page:
  pagesSortFields: ["Weight", "Date", "LinkTitle", "Path"] # Default value
  pagesSortDirections: {"Weight": "desc", "Date": "desc", "LinkTitle": "desc", "Path": "desc"} # Default value

Thinking about it some more, some alternative schemas could be

nextPrevSortFields: ["Weight", "Date", "LinkTitle", "Path"]
nextPrevSortDirections: ["desc", "desc", "desc", "desc"]

or

nextPrevSortFields: [["Weight", "desc"], ["Date", "desc"], ["LinkTitle", "desc"], ["Path", "desc"]]

or

nextPrevSortFields: [{"Weight": "desc"}, {"Date": "desc"}, {"LinkTitle": "desc"}, {"Path": "desc"}]

I am not commenting on the value vs. cost of your suggestion, but I did want to address the weight issue.

The concept of manually adding weights to content, both positive and negative, is not unique to Hugo. I spent some years in the Drupal world, and this approach is used throughout the app for various components, as it is for Hugo (e.g., content, languages, output formats, menu entries).

The key difference between Hugo and, for example, Drupal, is that Hugo doesn’t place items with zero weight in between negative and positive values. Instead, they appear after the heaviest weight. To me, that’s the aspect of weight that’s not intuitive. But that particular train left the station a long time ago.