From 5b9edd3f6c58ffeff6054b8379c50f847ea27f0e Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 24 Jul 2023 12:09:50 +0800 Subject: [PATCH] =?UTF-8?q?medium=20=E4=B8=BB=E9=A2=98=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/medium/components/ArticleInfo.js | 7 ++----- themes/medium/index.js | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/themes/medium/components/ArticleInfo.js b/themes/medium/components/ArticleInfo.js index b248a12e..3d4abce5 100644 --- a/themes/medium/components/ArticleInfo.js +++ b/themes/medium/components/ArticleInfo.js @@ -1,6 +1,5 @@ import BLOG from '@/blog.config' import LazyImage from '@/components/LazyImage' -import formatDate from '@/lib/formatDate' import Link from 'next/link' /** @@ -11,8 +10,6 @@ import Link from 'next/link' export default function ArticleInfo(props) { const { post, siteInfo } = props - const date = formatDate(post?.publishTime || post?.createdTime) - return (<> {/* title */}

{post?.title}

@@ -20,9 +17,9 @@ export default function ArticleInfo(props) { {/* meta */}
- {date} + {post?.publishTime} | - {post.lastEditedTime} + {post?.lastEditedTime}
diff --git a/themes/medium/index.js b/themes/medium/index.js index 72b27314..b57b8528 100644 --- a/themes/medium/index.js +++ b/themes/medium/index.js @@ -35,6 +35,7 @@ import Link from 'next/link' import { Transition } from '@headlessui/react' import { Style } from './style' import replaceSearchResult from '@/components/Mark' +import ArticleInfo from './components/ArticleInfo' // 主题全局状态 const ThemeGlobalMedium = createContext() @@ -161,6 +162,9 @@ const LayoutSlug = props => { {!lock &&
+ {/* 文章信息 */} + + {/* Notion文章主体 */}
{post && ()}