From 557b2bd72d0795275c4d132564b3fd6db033c575 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 9 Mar 2023 17:14:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getNotionData.js | 2 +- styles/notion.css | 3 +-- themes/matery/LayoutSlug.js | 2 +- themes/simple/components/DropMenu.js | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index 7f4db333..44d97f2f 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -235,7 +235,7 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { }) } - const notice = await getNotice(collectionData.filter(post => { return post?.type === 'Notice' && post.status === 'Published' })?.[0]) + const notice = await getNotice(collectionData.filter(post => { return post && post?.type && post?.type === 'Notice' && post.status === 'Published' })?.[0]) const categoryOptions = getAllCategories({ allPages, categoryOptions: getCategoryOptions(schema) }) const tagOptions = getAllTags({ allPages, tagOptions: getTagOptions(schema) }) const siteInfo = getBlogInfo({ collection, block }) diff --git a/styles/notion.css b/styles/notion.css index e966fe8e..e6e1e596 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -207,7 +207,6 @@ .medium-zoom-image { border-radius: 0; - @apply bg-gray-100 dark:bg-black } .medium-zoom-image--opened { @@ -939,7 +938,7 @@ code[class*='language-'] { align-self: flex-start; width: 24px; height: 24px; - font-size: 1.3em; + font-size: 1em; line-height: 1em; } diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index 02fc3060..5c076f7b 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -50,7 +50,7 @@ export const LayoutSlug = props => { {lock && } {!lock &&
- {post?.type === 'Post' && <> + { post?.type && post?.type === 'Post' && <>
{ {/* 子菜单 */} {hasSubMenu &&
    {link.subMenus.map(sLink => { - return
  • + return
  • {sLink.title}