import BLOG from '@/blog.config' import Link from 'next/link' import React from 'react' import TagItemMini from './TagItemMini' import CONFIG_MATERY from '../config_matery' import NotionPage from '@/components/NotionPage' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_MATERY.POST_LIST_PREVIEW && post.blockMap return (
{CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && !post.results && (
{/* eslint-disable-next-line @next/next/no-img-element */} {post.title} {post.title} {/* {post.title} */}
)} {/* 描述 */}
{(!showPreview || showSummary) && !post.results && post.summary && (

{post.summary}

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

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

)} {showPreview && (
)}
{post.date?.start_date || post.lastEditedTime} {post.category}
{post?.tagItems && post?.tagItems.length > 0 && (<>
{' '} {post.tagItems.map(tag => ( ))}
)}
) } export default BlogPostCard