1
Fork 0

Group by year

This commit is contained in:
Jan-Erik Rediger 2015-06-10 19:13:05 +02:00
parent 092ae3cc7f
commit f25f8a1f77

View file

@ -4,5 +4,10 @@ title: posts
--- ---
{% for post in site.posts %} {% for post in site.posts %}
{% capture currentyear %}{{post.date | date: "%Y"}}{% endcapture %}
{% if currentyear != year %}
### {{ currentyear }}
{% capture year %}{{currentyear}}{% endcapture %}
{% endif %}
* {{post.date | date_to_string}}: [{{post.title}}]({{post.url | remove_first: '/' | prepend: site.baseurl}}) * {{post.date | date_to_string}}: [{{post.title}}]({{post.url | remove_first: '/' | prepend: site.baseurl}})
{% endfor %} {% endfor %}