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