blog/archives.html

24 lines
656 B
HTML

---
layout: page
title: "Archives"
permalink: /archives/
---
<div class="blog-home">
{% if site.posts.size > 0 %}
{% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% if forloop.first %}
<a href="/archives/{{ this_year }}" id="{{ this_year }}-ref">{{this_year}}</a>
{% else %}
{% if this_year != next_year %}
<a href="/archives/{{ next_year }}" id="{{ next_year }}-ref">{{next_year}}</a>
{% endif %}
{% endif %}
{% endfor %}
</ol>
{% endif %}
</div>