---
layout: page
title:  Archive
permalink: /archive/
---

<div class="archive">
  <div class="timeline" id="timeline">
    {% for post in site.posts %}
    {% unless post.next %}
    <div class="archive-title">
      <h4 class="archive-year">{{ post.date | date: '%Y' }}</h4>
    </div>

    <ul>
    {% else %}
      {% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
      {% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
    {% if year != nyear %}
    </ul>
    <div class="archive-title">
      <h4 class="archive-year">{{ post.date | date: '%Y' }}</h4>
    </div>

    <ul>
    {% endif %}
    {% endunless %}
    <li>
      <div style="width:60px;float:left;">{{ post.date | date: "%b %-d" }}</div> <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></li>
    {% endfor %}
    </ul>

  </div>

</div>

---
layout: page
title:  Archive
permalink: /archive/
---

<div class="archive">
  <div class="timeline" id="timeline">
    {% assign posts_by_year = site.posts | group_by_exp:"post", "post.date | date: '%Y' " %}
    {% for group in posts_by_year %}
      <div class="archive-title">
        <h4 class="archive-year">{{ group.name }}</h4>
      </div>

      <ul>
      {% for post in group.items %}
        <li><div style="width:60px;float:left;">{{ post.date | date: "%b %-d" }}</div> <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></li>
      {% endfor %}
      </ul>

    {% endfor %}
  </div>

</div>

Use group_by_exp to group posts by year instead of custom algorithm
Use group_by_exp to group posts by year instead of custom algorithm
