Modified: archive 归档页面的月份排序修改为降序
This commit is contained in:
parent
6ccb5d3cc6
commit
fd1fd2bc3e
|
@ -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;
|
||||||
});
|
});
|
Loading…
Reference in New Issue