summaryrefslogtreecommitdiff
path: root/_site_build/archives/index.html
blob: 9c4644f01fe98a596c251d3d1394c1a201ff57f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
layout: default
title: Archives
robots: follow, noindex, noodp, noydir, noarchive
---
<section id="archives">
  <h1>Archives</h1>
  {% assign show_year = true %}
  {% assign show_month = true %}
  {% for post in site.posts %}
    {% if show_year %}
    <h2>{{ post.date | date: '%Y' }}</h2>
    {% endif %}
    {% if show_year or show_month %}
    <h3>{{ post.date | date: '%B' }}</h3>
    <ol>
    {% endif %}
    <li>
      <a href="{{ post.url }}" rel="bookmark" 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 %}
</section>