Modified: archive 归档页面的月份排序修改为降序

This commit is contained in:
XPoet 2020-03-30 10:20:17 +08:00
parent 6ccb5d3cc6
commit fd1fd2bc3e
1 changed files with 1 additions and 1 deletions

View File

@ -18,6 +18,6 @@ hexo.extend.helper.register('createNewArchivePosts', function (posts) {
postList.forEach(item => { postList.forEach(item => {
posts.forEach(post => item.year === post.date.year() && item.postList.push(post)) posts.forEach(post => item.year === post.date.year() && item.postList.push(post))
}); });
postList.forEach(item => item.postList.sort((a, b) => a.date.unix() - b.date.unix())); postList.forEach(item => item.postList.sort((a, b) => b.date.unix() - a.date.unix()));
return postList; return postList;
}); });