diff options
Diffstat (limited to '_site_build/archives/index.html')
| -rw-r--r-- | _site_build/archives/index.html | 29 |
1 files changed, 17 insertions, 12 deletions
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 --- <section id="archives"> <h1>Archives</h1> + {% assign show_year = true %} + {% assign show_month = true %} {% for post in site.posts %} - {% unless post.next %} + {% if show_year %} <h2>{{ post.date | date: '%Y' }}</h2> + {% endif %} + {% if show_year or show_month %} + <h3>{{ post.date | date: '%B' }}</h3> <ol> - {% else %} - {% capture year %}{{ post.date | date: '%Y' }}{% endcapture %} - {% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %} - {% if year != nyear %} - </ol> - <h2>{{ post.date | date: '%Y' }}</h2> - <ol> - {% endif %} - {% endunless %} + {% endif %} <li> - <time datetime="{{ post.date | date: '%Y-%m-%d' }}" pubdate>{{ post.date | date: '%b' }} {{ post.date | ordinalize }}</time> <a href="{{ post.url }}" rel="bookmark" target="_self" title="{{ post.title }}">{{ post.title }}</a> + <a href="{{ post.url }}" target="_self" title="{{ post.title }}">{{ post.title }}</a> </li> + {% 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 %} + </ol> + {% endif %} {% endfor %} - </ol> </section> |
