fortran-lang.org
fortran-lang.org copied to clipboard
Sort fpm registry alphabetically
The fpm registry at packages/fpm is currently sorted chronologically in the order of addition to the registry, a more useful sorting would be alphabetically.
It appears that Liquid is not able to sort a hash map alphabetically (!) by itself, therefore implementing this in Liquid will be ugly.
Perhaps the best option is to structure the index differently, as an array instead of a hash map
A hash map is the right representation for the registry, I see no need to adapt it due to the shortcomings of a templating language. An easy fix from the fpm-registry side would be sorting the index before committing it, alternatively we have to search for a gem that can add the feature we need for the webpage here.
True, though the index is only a serialisation, converting to an array serialisation does not preclude implementation as a hash map. I'd rather not complicate the build with additional Ruby code so sorting the index would be preferred. It's unfortunate to rely on the ordering of the data for rendering the site but your proposed solution is perhaps the simplest.
This should be discussed at https://github.com/fortran-lang/fpm-docs/issues/59