diff --git a/themes/example/components/BlogPostCard.js b/themes/example/components/BlogPostCard.js index a8783f8c..b66dcca3 100644 --- a/themes/example/components/BlogPostCard.js +++ b/themes/example/components/BlogPostCard.js @@ -4,6 +4,7 @@ import Link from 'next/link' import TwikooCommentCount from '@/components/TwikooCommentCount' import LazyImage from '@/components/LazyImage' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' +import NotionIcon from '@/components/NotionIcon' const BlogPostCard = ({ post }) => { const showPageCover = siteConfig('EXAMPLE_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail @@ -15,16 +16,18 @@ const BlogPostCard = ({ post }) => { - {post?.title} + {post?.title}
by {siteConfig('AUTHOR')} on {post.date?.start_date || post.createdTime} + {post.category && <> | {post.category} - {/* | */} + } + {/* | */} {/* 2 Comments */}
diff --git a/themes/example/components/Title.js b/themes/example/components/Title.js index 5c251b0d..4308611a 100644 --- a/themes/example/components/Title.js +++ b/themes/example/components/Title.js @@ -1,3 +1,4 @@ +import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' /** @@ -9,9 +10,10 @@ export const Title = (props) => { const { post } = props const title = post?.title || siteConfig('TITLE') const description = post?.description || siteConfig('AUTHOR') + console.log('post', post) return
-

{title}

+

{title}

{description}

diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 1b9076a4..fb038e3d 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -9,6 +9,7 @@ import { AdSlot } from '@/components/GoogleAdsense' import LazyImage from '@/components/LazyImage' import { formatDateFmt } from '@/lib/formatDate' import WWAds from '@/components/WWAds' +import NotionIcon from '@/components/NotionIcon' /** * @@ -36,7 +37,7 @@ export default function ArticleDetail(props) { {/* 文章Title */}
- {post.title} + {post.title}
diff --git a/themes/fukasawa/components/BlogCard.js b/themes/fukasawa/components/BlogCard.js index 6c85bfc8..d54daaba 100644 --- a/themes/fukasawa/components/BlogCard.js +++ b/themes/fukasawa/components/BlogCard.js @@ -4,6 +4,7 @@ import TagItemMini from './TagItemMini' import CONFIG from '../config' import LazyImage from '@/components/LazyImage' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' +import NotionIcon from '@/components/NotionIcon' /** * 文章列表卡片 @@ -32,7 +33,7 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => { const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}` return ( -
@@ -51,16 +52,18 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => { {/* 文字部分 */}
- - {post.title} - +

+ + {post.title} + +

{(!showPreview || showSummary) && ( -

+

{post.summary} -

+
)} {/* 分类标签 */} @@ -83,7 +86,7 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => {
-
+ ) } diff --git a/themes/gitbook/index.js b/themes/gitbook/index.js index b141252a..cd4f2207 100644 --- a/themes/gitbook/index.js +++ b/themes/gitbook/index.js @@ -33,6 +33,7 @@ import BlogArchiveItem from './components/BlogArchiveItem' import Link from 'next/link' import dynamic from 'next/dynamic' import { siteConfig } from '@/lib/config' +import NotionIcon from '@/components/NotionIcon' const WWAds = dynamic(() => import('@/components/WWAds'), { ssr: false }) // 主题全局变量 @@ -219,7 +220,7 @@ const LayoutSlug = (props) => { {!lock &&
{/* title */} -

{post?.title}

+

{post?.title}

{/* Notion文章主体 */} {post && (
diff --git a/themes/heo/components/BlogPostCard.js b/themes/heo/components/BlogPostCard.js index fa16fc25..b07fa06c 100644 --- a/themes/heo/components/BlogPostCard.js +++ b/themes/heo/components/BlogPostCard.js @@ -4,6 +4,7 @@ import TagItemMini from './TagItemMini' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' +import NotionIcon from '@/components/NotionIcon' const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const showPreview = siteConfig('HEO_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap @@ -13,7 +14,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const showPageCover = siteConfig('HEO_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail && !showPreview const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}` return ( -
+
{ {/* 文字区块 */}
-
+
{/* 分类 */} {post?.category && +
{/* 摘要 */} {(!showPreview || showSummary) && ( -

+

{post.summary} -

+
)}
@@ -70,7 +71,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
-
+
) } diff --git a/themes/hexo/components/BlogPostCardInfo.js b/themes/hexo/components/BlogPostCardInfo.js index 890952d5..6ab5eda7 100644 --- a/themes/hexo/components/BlogPostCardInfo.js +++ b/themes/hexo/components/BlogPostCardInfo.js @@ -5,6 +5,7 @@ import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { formatDateFmt } from '@/lib/formatDate' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' +import NotionIcon from '@/components/NotionIcon' /** * 博客列表的文字内容 @@ -13,58 +14,63 @@ import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' */ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary }) => { const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}` - return
+ return
- {/* 标题 */} - +
+

+ {/* 标题 */} + - {post.title} + {post.title} - + +

- {/* 分类 */} - { post?.category &&
- + {/* 分类 */} + { post?.category &&
+ - - {post.category} + + {post.category} - + - -
} + +
} +
- {/* 摘要 */} - {(!showPreview || showSummary) && !post.results && ( -

+ {/* 摘要 */} + {(!showPreview || showSummary) && !post.results && ( +

{post.summary} -

- )} +
+ )} - {/* 搜索结果 */} - {post.results && ( -

- {post.results.map((r, index) => ( - {r} - ))} -

- )} - {/* 预览 */} - {showPreview && ( -
- -
- )} + {/* 搜索结果 */} + {post.results && ( +

+ {post.results.map((r, index) => ( + {r} + ))} +

+ )} + + {/* 预览 */} + {showPreview && ( +
+ +
+ )}
@@ -92,5 +98,5 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary
- + } diff --git a/themes/matery/components/BlogPostCard.js b/themes/matery/components/BlogPostCard.js index 7700957d..d66ee6db 100644 --- a/themes/matery/components/BlogPostCard.js +++ b/themes/matery/components/BlogPostCard.js @@ -6,6 +6,7 @@ import TwikooCommentCount from '@/components/TwikooCommentCount' import LazyImage from '@/components/LazyImage' import { formatDateFmt } from '@/lib/formatDate' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' +import NotionIcon from '@/components/NotionIcon' const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const showPreview = siteConfig('MATERY_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap @@ -27,7 +28,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { className="w-full mb-4 overflow-hidden shadow-md border dark:border-black rounded-xl bg-white dark:bg-hexo-black-gray"> {/* 固定高度 ,空白用图片拉升填充 */} -
+
{/* 头部图片 填充卡片 */} {showPageCover && ( @@ -38,13 +39,15 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { alt={post.title} className="h-full w-full group-hover:scale-125 group-hover:brightness-50 brightness-90 rounded-t-md transform object-cover duration-500" /> -
{post.title}
+

+ {post.title} +

)} {/* 文字描述 */} -
+
{/* 描述 */}
@@ -93,8 +96,8 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
)} - - + + ) diff --git a/themes/matery/components/PostHeader.js b/themes/matery/components/PostHeader.js index 56f8e541..9279b78c 100644 --- a/themes/matery/components/PostHeader.js +++ b/themes/matery/components/PostHeader.js @@ -1,4 +1,5 @@ import LazyImage from '@/components/LazyImage' +import NotionIcon from '@/components/NotionIcon' /** * 文章背景图 @@ -9,7 +10,7 @@ export default function PostHeader({ post, siteInfo }) { return ( )} - + ) } diff --git a/themes/nav/index.js b/themes/nav/index.js index c8006469..1e263050 100755 --- a/themes/nav/index.js +++ b/themes/nav/index.js @@ -33,6 +33,7 @@ import LogoBar from './components/LogoBar' import { siteConfig } from '@/lib/config' import Live2D from '@/components/Live2D' import BlogArchiveItem from './components/BlogArchiveItem' +import NotionIcon from '@/components/NotionIcon' const WWAds = dynamic(() => import('@/components/WWAds'), { ssr: false }) @@ -221,7 +222,7 @@ const LayoutSlug = (props) => { {!lock &&
{/* title */} -

{post?.title}

+

{post?.title}

{/* Notion文章主体 */} {post && (
diff --git a/themes/nobelium/components/ArticleInfo.js b/themes/nobelium/components/ArticleInfo.js index 3e6a6220..b916d8cc 100644 --- a/themes/nobelium/components/ArticleInfo.js +++ b/themes/nobelium/components/ArticleInfo.js @@ -3,6 +3,7 @@ import Image from 'next/image' import TagItem from './TagItem' import md5 from 'js-md5' import { siteConfig } from '@/lib/config' +import NotionIcon from '@/components/NotionIcon' export const ArticleInfo = (props) => { const { post } = props @@ -12,9 +13,9 @@ export const ArticleInfo = (props) => { return
-
- {post?.title} -
+

+ {post?.title} +

{post?.type !== 'Page' && <>
+ +