I have some .md
posts, like:
- 2016-10-01-first_post.md (title: FIRST)
- 2016-10-03-some_post.md (title: SOME)
- 2016-10-04-another_post.md (title: ANOTHER)
- 2016-10-07-my_post.md (title: MY)
- 2016-10-08-just_a_post.md (title: JUST)
and I created a .html
file:
---
layout: default
title: Archives
---
<ul>
{% for post in site.posts %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
then I got a posts list sorted by file names:
• FIRST
• SOME
• ANOTHER
• MY
• JUST
I want to sort the posts in site.posts
alphabetically by post.title
, but I don't know how:
• ANOTHER
• FIRST
• JUST
• MY
• SOME
So I'm looking for some help, thx