import Link from 'next/link' import CONFIG from '../config' import { BlogPostCardInfo } from './BlogPostCardInfo' import { siteConfig } from '@/lib/config' import LazyImage from '@/components/LazyImage' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const showPreview = siteConfig('HEXO_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap if (post && !post.pageCoverThumbnail && siteConfig('HEXO_POST_LIST_COVER_DEFAULT', null, CONFIG)) { post.pageCoverThumbnail = siteInfo?.pageCover } const showPageCover = siteConfig('HEXO_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail && !showPreview // const delay = (index % 2) * 200 const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}` return (
{/* 文字内容 */} {/* 图片封面 */} {showPageCover && (
)}
) } export default BlogPostCard