From 44a4b6a3f2ffb871a05ba9afe46901ec8b65fa36 Mon Sep 17 00:00:00 2001 From: davidtsadler Date: Sat, 7 Jan 2012 22:13:25 +0000 Subject: Show archives by month as well as year. --- _site_build/archives/index.html | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to '_site_build') diff --git a/_site_build/archives/index.html b/_site_build/archives/index.html index 721e66a..45272d0 100644 --- a/_site_build/archives/index.html +++ b/_site_build/archives/index.html @@ -5,23 +5,28 @@ robots: follow, noindex, noodp, noydir ---

Archives

+ {% assign show_year = true %} + {% assign show_month = true %} {% for post in site.posts %} - {% unless post.next %} + {% if show_year %}

{{ post.date | date: '%Y' }}

+ {% endif %} + {% if show_year or show_month %} +

{{ post.date | date: '%B' }}

    - {% else %} - {% capture year %}{{ post.date | date: '%Y' }}{% endcapture %} - {% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %} - {% if year != nyear %} -
-

{{ post.date | date: '%Y' }}

-
    - {% endif %} - {% endunless %} + {% endif %}
  1. - {{ post.title }} + {{ post.title }}
  2. + {% capture year %}{{ post.date | date: '%Y' }}{% endcapture %} + {% capture pyear %}{{ post.previous.date | date: '%Y' }}{% endcapture %} + {% capture month %}{{ post.date | date: '%B' }}{% endcapture %} + {% capture pmonth %}{{ post.previous.date | date: '%B' }}{% endcapture %} + {% if year != pyear %}{% assign show_year = true %}{% else %}{% assign show_year = false %}{% endif %} + {% if month != pmonth %}{% assign show_month = true %}{% else %}{% assign show_month = false %}{% endif %} + {% if show_year or show_month %} +
+ {% endif %} {% endfor %} -
-- cgit v1.2.3-13-gbd6f