For someone that updates posts very often it's necessary to have posts sorted from new to old based on last modification date instead of Jekyll's default sort by posted date.
There seems to be no easy way of accomplishing this. I've read and tested pretty much all methods out there.
Here's what worked (partially as expected):
Used this gem https://github.com/gjtorikian/jekyll-last-modified-at but now I have to manually enter last_modified_at
in each post's front-matter in order for Jekyll to sort the posts using this loop:
{% assign sorted_posts = site.posts | sort: "last_modified_at" | reverse %}
{% for post in sorted_posts %}
<!-- CODE HERE -->
{% endfor %}
The issue is having the last_modified_at
inside each post as it stops the plugin from auto-setting that value every time I hit CTRL+S to save a post.
Is there any way I can automate this?