From c4382e7b8e45d610f28fde2a03e68aea0432375e Mon Sep 17 00:00:00 2001
From: "tangly1024.com"
Date: Thu, 7 Mar 2024 10:27:25 +0800
Subject: [PATCH] =?UTF-8?q?nobelium=E4=B8=BB=E9=A2=98=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A2=84=E8=A7=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
themes/nobelium/components/BlogPost.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/themes/nobelium/components/BlogPost.js b/themes/nobelium/components/BlogPost.js
index 6d3996a9..b5845cf9 100644
--- a/themes/nobelium/components/BlogPost.js
+++ b/themes/nobelium/components/BlogPost.js
@@ -2,10 +2,13 @@ import Link from 'next/link'
import { siteConfig } from '@/lib/config'
import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils'
import NotionIcon from '@/components/NotionIcon'
+import NotionPage from '@/components/NotionPage'
const BlogPost = ({ post }) => {
const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}`
+ const showPreview = siteConfig('POST_LIST_PREVIEW') && post.blockMap
+
return (
(
@@ -19,9 +22,15 @@ const BlogPost = ({ post }) => {
-
+ {!showPreview &&
{post.summary}
-
+
}
+ {showPreview && post?.blockMap && (
+
+
+
+
+ )}