import BLOG from '@/blog.config' import Link from 'next/link' import React from 'react' import TagItemMini from './TagItemMini' import CONFIG_HEXO from '../config_hexo' import NotionPage from '@/components/NotionPage' const BlogPostCard = ({ post, showSummary, index, siteInfo }) => { const showPreview = CONFIG_HEXO.POST_LIST_PREVIEW && post.blockMap if (post && !post.page_cover && CONFIG_HEXO.POST_LIST_COVER_DEFAULT) { post.page_cover = siteInfo?.pageCover } const showPageCover = CONFIG_HEXO.POST_LIST_COVER && post?.page_cover return (
{post.title}
{post.date?.start_date || post.lastEditedTime}
{(!showPreview || showSummary) && !post.results && (

{post.summary}

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

{post.results.map(r => ( {r} ))}

)} {showPreview && (
)}
{post.category}
{' '} {post.tagItems.map(tag => ( ))}
{showPageCover && !showPreview && post?.page_cover && (
{/* eslint-disable-next-line @next/next/no-img-element */} {post.title} {/* {post.title} */}
)}
) } export default BlogPostCard