<%- partial('_widget/grouping',{data:years,keys:Object.keys(years).reverse()}) %>
%- partial('_partial/header',{name:'tags'}) %> <% let date_cursor = 'xxx' page.title = "标签:" + page.tag %> <% let years = {}; page.posts.each(function (post) { if(date(post.date, "YYYY") != date_cursor) { date_cursor = date(post.date, "YYYY") if(years[date_cursor] === undefined){ years[date_cursor] = [] } } years[date_cursor].push(post); }) %>