From 24269f457e31d32c77fde5cb89a3f6d63b5ab7aa Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 31 Dec 2019 15:10:47 +0800 Subject: [PATCH] =?UTF-8?q?Fixed:=20=E4=BF=AE=E5=BE=A9=E7=9B=B8=E9=97=9C?= =?UTF-8?q?=E6=96=87=E7=AB=A0=20=E6=97=A5=E6=9C=9F=E9=A1=AF=E7=A4=BA?= =?UTF-8?q?=E9=8C=AF=E8=AA=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/related_post.js | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) 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 += '