There seems to be a lot of bugs like this in Hugo. Another problem I ran into is functions returning weighted pages, when there is no discussion of what weighted pages are in the docs. Yet another problem is that accessing .Reverse reverses the actual list instead of returning a reversed copy of the original. The only way I could figure out what Hugo was doing was by reading the source.
The simplest solution was to stop using Hugo. Jekyll may be a lot slower, but it does what it says it does!
Hugo is a open source project contributed to 100% by volunteers in their free time. While it’s not by any means perfect, the docs are pretty comprehensive and the code is generally stable. The docs do indeed talk about pages weight. https://www.google.com/#q=site:gohugo.io+weight . We even had one user running Hugo on over 500k content files successfully without any issues.
As Hugo is a volunteer effort, it depends on people like you to make it better. One of the best ways to contribute is to report bugs so we can fix them. You’ll find that we’re actually quite good at fixing them quickly. Another way to help is to add documentation or even just file tickets about missing parts of the documentation.
We’re sorry to see you go. Jekyll is a good project with a good community around it and a solid option, but to think it’s without bugs is just a very naive and incorrect statement. Jekyll has plenty of bugs https://github.com/jekyll/jekyll/issues . They are in the middle of a major rewrite to address some of the limitations of the current architecture.
Sorts maps, arrays and slices, returning a sorted slice. A sorted array of map values will be returned, with the keys eliminated. There are two optional arguments, which are sortByField and sortAsc. If left blank, sort will sort by keys (for maps) in ascending order.