import LazyImage from '@/components/LazyImage' import NotionIcon from './NotionIcon' import { siteConfig } from '@/lib/config' import Link from 'next/link' import CONFIG from '../config' import TagItemMini from './TagItemMini' const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const showPreview = siteConfig('HEO_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap if ( post && !post.pageCoverThumbnail && siteConfig('HEO_POST_LIST_COVER_DEFAULT', null, CONFIG) ) { post.pageCoverThumbnail = siteInfo?.pageCover } const showPageCover = siteConfig('HEO_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail && !showPreview const POST_TWO_COLS = siteConfig('HEO_HOME_POST_TWO_COLS', true, CONFIG) const COVER_HOVER_ENLARGE = siteConfig( 'HEO_POST_LIST_COVER_HOVER_ENLARGE', true, CONFIG ) return (
{/* 图片封面 */} {showPageCover && (
)} {/* 文字区块 */}
{/* 分类 */} {post?.category && ( )} {/* 标题和图标 */} {siteConfig('POST_TITLE_ICON') && ( )} {post.title}
{/* 摘要 */} {(!showPreview || showSummary) && (
{post.summary}
)}
{' '} {post.tagItems?.map(tag => ( ))}
) } export default BlogPostCard