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('TYPOGRAPHY_POST_COVER_ENABLE', false, CONFIG) const showPreview = siteConfig('POST_LIST_PREVIEW', false, NOTION_CONFIG) && post.blockMap return (
{/* 文章标题 */}
{/* 图片封面 */} {showPageCover && (
)}

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

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

)}
) }