From 4a730af100c7c96356578dc6967264295d016328 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Sat, 1 Jun 2024 19:55:41 +0800 Subject: [PATCH] fix: format undefined --- package.json | 2 +- scripts/helper/articleCopyright.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index da51957..2671229 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-reimu", - "version": "0.1.2", + "version": "0.2.0-beta.1", "description": "A Hakurei Reimu style Hexo theme", "repository": { "type": "git", diff --git a/scripts/helper/articleCopyright.js b/scripts/helper/articleCopyright.js index 926db5d..73ac100 100644 --- a/scripts/helper/articleCopyright.js +++ b/scripts/helper/articleCopyright.js @@ -2,12 +2,12 @@ hexo.extend.helper.register("articleCopyright", (post) => { const authorDom = `

本文作者:${hexo.config.author} @ ${hexo.config.title}

`; const linkDom = `

本文链接:${post.permalink}

`; const titleDom = `

本文标题:${post.title}

`; - const dateDom = `

本文发布时间:${post.date.format( + const dateDom = `

本文发布时间:${post.date?.format( "YYYY-MM-DD HH:mm:ss" - )}

`; - const updatedDom = `

本文修改时间:${post.updated.format( + ) ?? '未知(゚⊿゚)ツ'}

`; + const updatedDom = `

本文修改时间:${post.updated?.format( "YYYY-MM-DD HH:mm:ss" - )}

`; + ) ?? '未知(゚⊿゚)ツ'}

`; const licenseDom = `

本文版权:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

`; if (!hexo.theme.config.article_copyright.enable) return ""; const { author, link, title, date, updated, license } =