<% if (pagination === 2) { %> <% page.posts.each(function(post) { %> <%- partial('article', {post: post, index: true}) %> <% }) %> <% } else { %> <% let last %> <% page.posts.each(function(post, i) { %> <% const year = post.date.year() %> <% if (last !== year) { %> <% if (last !== null) { %> <% } %> <% last = year %>
<% } %> <%- partial('archive-post', {post: post, even: i % 2 === 0}) %> <% }) %> <% if (page.posts.length) { %>
<% } %> <% } %> <% if (page.total > 1) { %> <% } %>