文章归档
<% let years = []; posts.forEach((item) => {
const year = item.date.substring(0, 4);
if (!years.includes(year)) {
years.push(year);
}
}); %>
<% years.forEach(function(year) { %>
<%- year %>
<% posts.forEach(function(post) { %>
<% if (post.date.indexOf(year) !== -1) { %>
<% } %>
<% }); %>
<% }); %>
<%- include('./_blocks/pagination') %>