Group by year
This commit is contained in:
parent
092ae3cc7f
commit
f25f8a1f77
5
posts.md
5
posts.md
|
@ -4,5 +4,10 @@ title: 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}})
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue