% let last %> <% page.posts.each((post, i) => { %> <% const year = post.date.year() %> <% if (last !== year) { %> <% if (last !== null) { %> <% } %> <% last = year %> <% } %> <%- partial('archive-post', {post: post}) %> <% }) %> <% if (page.posts.length) { %> <% } %> <% if (page.total > 1) { %> <% const prev_text = '« ' + __('prev') const next_text = __('next') + ' »' %> <%- paginator({ prev_text: prev_text, next_text: next_text, escape: false }) %> <% } %>