From db0dfe16052c873f4e3c11a3b03e21ea250c8f92 Mon Sep 17 00:00:00 2001 From: huisc Date: Fri, 9 Dec 2022 15:30:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=BB=91=E6=9A=97?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E6=96=87=E7=AB=A0=E9=A1=B5=E9=9D=A2=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=B1=BB=E6=8C=89=E9=92=AE=E3=80=81=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E6=A1=86=E8=83=8C=E6=99=AF=E8=89=B2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/next/components/ArticleDetail.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js index d1ccb744..478627b3 100644 --- a/themes/next/components/ArticleDetail.js +++ b/themes/next/components/ArticleDetail.js @@ -94,7 +94,7 @@ export default function ArticleDetail(props) {
{/* 分类 */} {post.category && <> -
+
<> {post.category} @@ -123,7 +123,7 @@ export default function ArticleDetail(props) { } {/* 评论互动 */} -
+
From 03618d2ae7ecde73fd8338caad3f733679e70e9b Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Fri, 9 Dec 2022 17:27:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getNotionData.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index 50c84696..11913b2d 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -215,6 +215,9 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { // 读取映射 配置 let postCount = 0 + // 获取page作为自定义菜单 + const customNav = getCustomNav({ allPages: collectionData.filter(post => post.type === 'Page' && post.status === 'Published') }) + const allPages = collectionData.filter(post => { if (post.type === 'Post' && post.status === 'Published') { postCount++ @@ -236,7 +239,6 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { }) } - const customNav = getCustomNav({ allPages }) const categories = getAllCategories({ allPages, categoryOptions, sliceCount: BLOG.PREVIEW_CATEGORY_COUNT }) const tags = getAllTags({ allPages, sliceCount: BLOG.PREVIEW_TAG_COUNT, tagOptions }) const latestPosts = getLatestPosts({ allPages, from, latestPostCount: 5 }) From cecc4de8df2f18830a5ebad471d737a997e0ac6c Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Fri, 9 Dec 2022 22:17:06 +0800 Subject: [PATCH 3/3] medium-beautify --- themes/medium/LayoutArchive.js | 2 +- themes/medium/LayoutBase.js | 2 +- themes/medium/LayoutCategoryIndex.js | 2 +- themes/medium/LayoutTagIndex.js | 2 +- themes/medium/components/BlogPostCard.js | 2 +- themes/medium/components/TopNavBar.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/themes/medium/LayoutArchive.js b/themes/medium/LayoutArchive.js index 2f4abb2a..78c73360 100644 --- a/themes/medium/LayoutArchive.js +++ b/themes/medium/LayoutArchive.js @@ -24,7 +24,7 @@ export const LayoutArchive = props => { }) return ( -
+
{Object.keys(archivePosts).map(archiveTitle => (
{
{/* 移动端顶部菜单 */} -
+
{slotTop} {children}
diff --git a/themes/medium/LayoutCategoryIndex.js b/themes/medium/LayoutCategoryIndex.js index 5dc91f81..745c2c78 100644 --- a/themes/medium/LayoutCategoryIndex.js +++ b/themes/medium/LayoutCategoryIndex.js @@ -6,7 +6,7 @@ export const LayoutCategoryIndex = (props) => { const { categories } = props const { locale } = useGlobal() return -
+
{locale.COMMON.CATEGORY}:
diff --git a/themes/medium/LayoutTagIndex.js b/themes/medium/LayoutTagIndex.js index 2c754495..1667dc63 100644 --- a/themes/medium/LayoutTagIndex.js +++ b/themes/medium/LayoutTagIndex.js @@ -7,7 +7,7 @@ export const LayoutTagIndex = props => { const { locale } = useGlobal() return ( -
+
{locale.COMMON.TAGS}: diff --git a/themes/medium/components/BlogPostCard.js b/themes/medium/components/BlogPostCard.js index 9ad4c46c..7cbadf83 100644 --- a/themes/medium/components/BlogPostCard.js +++ b/themes/medium/components/BlogPostCard.js @@ -15,7 +15,7 @@ const BlogPostCard = ({ post, showSummary }) => { key={post.id} className="animate__animated animate__fadeIn duration-300 mb-6 max-w-7xl border-b dark:border-gray-800 " > -