How to adjust Jekyll post order?

There is an example in the official Jekyll documentation how to create a basic post archive page:
Displaying an index of posts

Bonus: For a prettier archive page (grouped by year or year/month), see this answer.


You’re right, I can’t find anything in the docs where it says how the posts are ordered, but in fact Jekyll does order them chronologically, with the most recent post first (you can see this if you try the examples I linked above).

To sort them the other way (the oldest post first), you can use the reversed keyword, according to the Liquid documentation:

{% for post in site.posts reversed %}

However, I don’t know how two posts on the same date are ordered, because I don’t write that much posts, so I never had that problem 🙂
You have to try that yourself.

Leave a Comment