Is there a way to sort lists by two fields with Jekyll/Liquid? For example, sorting first by year and then title. I have tried:
{% assign list = site.data.papers.papers | sort: 'year' | sort: 'title' %}
but that left it sorted only based on the last field, in this case the title. There was some discussion on this, but it seems to have been frozen without being merged: https://github.com/jekyll/jekyll/issues/1802
Thanks!
group_by
tip. The first two assignments could also be merged in your example ({% assign years = site.data.papers.papers | group_by: 'year' | sort: 'name' %}
), but that does not change the fact that your code works. – Leigha