Add descending support for sort_by

Sometimes we need sort the pages descending. For example, when sort by weight, I can use a big weight to make some page always on top. Currently, weight=0 will on the first place, this is not conveniently.

This can be implemented by adding a sort_desc field to section’s meta data, if it is ok, I can add a pr for this.

There is paginate_reversed which should probably just be moved to not work on just pagination.

Thanks a lot, paginate_reversed works for paginator.pages, but some themes use get_section() to fetch pages(like theme zolastrap), it seems paginate_reversed not work for get_section() . Do you have any suggestion?

If it’s not paginated, you can do {% set pages = section.pages | reverse %} in the template?

You are right, I can use reverse filter :smiley: