<div class=“archives”> {% for post in site.posts %}
{% assign post_year = post.date | date: "%Y" %} {% if post_year != year %} {% unless forloop.first %} </ul> {% endunless %} <h2>{{ post_year }}</h2> <ul> {% assign year = post_year %} {% endif %} <li property="blogPost" typeof="BlogPosting"> <a property="url" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a> <span class="post-date">{{ post.date | date: "%m/%d" }}</span> </li> {% if forloop.last %} </ul> {% endif %}
{% endfor %} </div>