From 8f6ae6b36604c6dcfc105d7bbfd21716373b9739 Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Sun, 3 Jun 2012 11:50:08 +0800 Subject: simplify archive --- source/_includes/archive_post.html | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'source/_includes/archive_post.html') diff --git a/source/_includes/archive_post.html b/source/_includes/archive_post.html index 8ceae91..2b006f6 100644 --- a/source/_includes/archive_post.html +++ b/source/_includes/archive_post.html @@ -1,9 +1,19 @@ -{% capture category %}{{ post.categories | size }}{% endcapture %} -

{{post.title}}

-
- {{ post.date | date: "%b %e" }} - {% include post/categories.html %} - {% if site.disqus_short_name and post.comments == true %} - Comments - {% endif %} -
\ No newline at end of file +{% capture date %}{{ post.date }}{% endcapture %} +{% capture this_year %}{{ date | date: "%Y" }}{% endcapture %} +{% unless year == this_year %} + {% assign year = this_year %} + {% unless forloop.first %} + + {% endunless %} +

{{ date | date: "%Y" }}

+{% endunless %} +
+

{{post.title}}

+
+ {{ date | date: "%b %e" }} + {% include post/categories.html %} + {% if site.disqus_short_name and post.comments == true and site.disqus_show_comment_count == true %} + Comments + {% endif %} +
+
\ No newline at end of file -- cgit v1.2.3