diff --git a/scripts/related_post.js b/scripts/related_post.js index ed4f04d..146e51d 100644 --- a/scripts/related_post.js +++ b/scripts/related_post.js @@ -1,9 +1,4 @@ -const moment = require('moment-timezone'); -const { - isMoment -} = moment; - - +const moment = require('moment'); hexo.extend.helper.register('related_posts', function (currentPost, allPosts) { var relatedPosts = []; @@ -16,7 +11,7 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) { cover: post.cover, weight: 1, updated: post.updated, - created: post.created + created: post.date }; var index = findItem(relatedPosts, 'path', post.path); if (index != -1) { @@ -64,9 +59,9 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) { result += '