From 847e9272ea2345e434054815e7d7ad3c3d4e104d Mon Sep 17 00:00:00 2001 From: Nico von Geyso Date: Mon, 30 Jul 2012 20:58:11 +0200 Subject: group blog posts by year --- blog.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'blog.html') diff --git a/blog.html b/blog.html index 3fdec48..579fd5a 100644 --- a/blog.html +++ b/blog.html @@ -6,11 +6,14 @@ {% block content %}

Latest posts

-{% for post in site.posts %} -

- {{ post.title }} - - - {{ post.date.strftime('%Y, %B %d') }} -

+{% for year,entries in site.posts|group_by_year|dictsort|reverse %} +

{{ year }}

+ {% for post in entries %} +

+ {{ post.date.strftime('%B %d') }} + - + {{ post.title }} +

+ {% endfor %} {% endfor %} {% endblock %} -- cgit v1.2.3-1-g7c22