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 && ( +
+ +
+
+ )}