Last Updated: July 06, 2016
·
582
· ryrych

Displaying Jekyll collection items in a reversed order

By default posts are displayed in a reversed order. Collections, by default, are not. Last week I moved all protips to a separate collecion in order not to spam the main page.

Jekyll makes use of Liquid template language tags and filters. To keep all protips in order do something like this:

{% raw %}{% for post in site.protips reversed %}
  {{post.title}}
{% endfor %}{% endraw %}