<% if (page.year || page.month) { %> <%- partial('_partial/archive') %> <% } else { %>
<% var year = -1, postid = -1; site.posts.sort('date', -1).each(function(post) { post.year = date(post.date, 'YYYY'); if (post.year && post.year !== year) { year = post.year; %>

<%= year %>


<% } %>
<%= post.title %>
<% }); %>
<% } %>