% if (pagination == 2){ %> <% page.posts.each(function(post){ %> <%- partial('article', {post: post, index: true}) %> <% }) %> <% if (page.total > 1){ %> <%- paginator({ prev_text: '« ' + __('nav.prev'), next_text: __('nav.next') + ' »' }) %> <% } %> <% } else { %> <% var last; %> <% page.posts.each(function(post, i){ %> <% var year = post.date.year(); %> <% if (last != year){ %> <% if (last != null){ %> <% } %> <% last = year; %> <%= year %> <% } %> <%- partial('article', {post: post, index: true}) %> <% }) %> <% if (page.posts.length){ %> <% } %> <% } %>