<% switch (type) { case 'archive': var last; page.posts.each(function(post, i) { var year = post.date.year(); if (last != year) { if (last != null) { %> <% } last = year; %>
<%= year %>
<% } %> <%- partial('archive-post', {post: post, archive: true}) %> <% }); if (page.posts.length) { %>
<% } if (page.total > 1) { %> <% } break; case 'category': %>
<%= page.category %>
<% page.posts.each(function (post, i) { %> <%- partial('archive-post', {post: post, archive: false}) %> <% }); %>
<% if (page.total > 1) { %> <% } break; case 'tag': %>
#<%= page.tag %>
<% page.posts.each(function (post, i) { %> <%- partial('archive-post', {post: post, archive: false}) %> <% }); %>
<% if (page.total > 1) { %> <% } break; default: page.posts.each(function(post) { %> <%- partial('article', {post: post, index: true}) %> <% }) if (page.total > 1) { %> <% } break; } %>