Skip to content

Commit

Permalink
fix: format undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Jun 1, 2024
1 parent 9344543 commit 4a730af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions scripts/helper/articleCopyright.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ hexo.extend.helper.register("articleCopyright", (post) => {
const authorDom = `<p><strong>本文作者:</strong>${hexo.config.author} @ ${hexo.config.title}</p>`;
const linkDom = `<p><strong>本文链接:</strong><a href="${post.permalink}">${post.permalink}</a></p>`;
const titleDom = `<p><strong>本文标题:</strong>${post.title}</p>`;
const dateDom = `<p><strong>本文发布时间:</strong>${post.date.format(
const dateDom = `<p><strong>本文发布时间:</strong>${post.date?.format(
"YYYY-MM-DD HH:mm:ss"
)}</p>`;
const updatedDom = `<p><strong>本文修改时间:</strong>${post.updated.format(
) ?? '未知(゚⊿゚)ツ'}</p>`;
const updatedDom = `<p><strong>本文修改时间:</strong>${post.updated?.format(
"YYYY-MM-DD HH:mm:ss"
)}</p>`;
) ?? '未知(゚⊿゚)ツ'}</p>`;
const licenseDom = `<p><strong>本文版权:</strong>本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh"><span class="icon-creative-commons"></span>BY-NC-SA</a> 许可协议。转载请注明出处!</p>`;
if (!hexo.theme.config.article_copyright.enable) return "";
const { author, link, title, date, updated, license } =
Expand Down

0 comments on commit 4a730af

Please sign in to comment.