From 1057ee82d1247e70d0eea8b4e602bc213d28f113 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 29 Sep 2021 17:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/TagItem.js | 2 +- layouts/ArticleLayout.js | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/components/TagItem.js b/components/TagItem.js index fa0aa8dd..8935e0e3 100644 --- a/components/TagItem.js +++ b/components/TagItem.js @@ -3,7 +3,7 @@ import Link from 'next/link' const TagItem = ({ tag }) => ( -

{tag}

diff --git a/layouts/ArticleLayout.js b/layouts/ArticleLayout.js index 53874548..5867ecfe 100644 --- a/layouts/ArticleLayout.js +++ b/layouts/ArticleLayout.js @@ -75,10 +75,17 @@ const ArticleLayout = ({ {/* 文章信息 */} -
+
+ {frontMatter.slug !== 'about' && (<> + + {BLOG.author} + + )} {frontMatter.tags && (
{frontMatter.tags.map(tag => ( @@ -87,18 +94,8 @@ const ArticleLayout = ({
)} - {frontMatter.slug !== 'about' && (<> - - {BLOG.author} -
{BLOG.author}
-
- )} - {frontMatter.type[0] !== 'Page' && ( -
+
{formatDate( frontMatter?.date?.start_date || frontMatter.createdTime, BLOG.lang