import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import NotionPage from '@/components/NotionPage' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' import Link from 'next/link' import CONFIG from '../config' export const BlogItem = props => { const { post } = props const { NOTION_CONFIG } = useGlobal() const showPageCover = siteConfig('SIMPLE_POST_COVER_ENABLE', false, CONFIG) const showPreview = siteConfig('POST_LIST_PREVIEW', false, NOTION_CONFIG) && post.blockMap return (
{/* 文章标题 */}
{/* 图片封面 */} {showPageCover && (
)}

{siteConfig('POST_TITLE_ICON') && ( )} {post.title}

{/* 文章信息 */}
{' '} {siteConfig('AUTHOR')} {' '} {post.date?.start_date || post.createdTime}
{post.category && ( {' '} {post.category} )} {post?.tags && post?.tags?.length > 0 && post?.tags.map(t => ( /{t} ))}
{!showPreview && ( <> {post.summary} {post.summary && ...} )} {showPreview && post?.blockMap && (

)}
Continue Reading{' '}
) }