summaryrefslogtreecommitdiffstats
path: root/blog.html
diff options
context:
space:
mode:
authorNico von Geyso <Nico.Geyso@FU-Berlin.de>2012-07-30 20:58:11 +0200
committerNico von Geyso <Nico.Geyso@FU-Berlin.de>2012-07-30 20:58:11 +0200
commit847e9272ea2345e434054815e7d7ad3c3d4e104d (patch)
treee975fe66efc806a243a9262d687bc4724c7ffe2a /blog.html
parent85e937ad4dc3bdd4ef23b6c6f0de8d45bb692725 (diff)
downloadwww-847e9272ea2345e434054815e7d7ad3c3d4e104d.tar.gz
www-847e9272ea2345e434054815e7d7ad3c3d4e104d.tar.bz2
www-847e9272ea2345e434054815e7d7ad3c3d4e104d.zip
group blog posts by year
Diffstat (limited to 'blog.html')
-rw-r--r--blog.html15
1 files changed, 9 insertions, 6 deletions
diff --git a/blog.html b/blog.html
index 3fdec48..579fd5a 100644
--- a/blog.html
+++ b/blog.html
@@ -6,11 +6,14 @@
{% block content %}
<h2>Latest posts</h2>
-{% for post in site.posts %}
-<p>
- <a href="{{ post.get_url() }}">{{ post.title }}</a>
- -
- {{ post.date.strftime('%Y, %B %d') }}
-</p>
+{% for year,entries in site.posts|group_by_year|dictsort|reverse %}
+ <h3>{{ year }}</h3>
+ {% for post in entries %}
+ <p>
+ {{ post.date.strftime('%B %d') }}
+ -
+ <a href="{{ post.get_url() }}">{{ post.title }}</a>
+ </p>
+ {% endfor %}</ul></li>
{% endfor %}
{% endblock %}