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}