import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import Image from 'next/image' import Link from 'next/link' import React from 'react' import Card from './Card' import TagItemMini from './TagItemMini' import CONFIG_NEXT from '../config_next' import NotionPage from '@/components/NotionPage' import NotionIcon from '@/components/NotionIcon' const BlogPostCard = ({ post, showSummary }) => { const { locale } = useGlobal() const showPreview = CONFIG_NEXT.POST_LIST_PREVIEW && post.blockMap return (
{post.title}
{post.category && ( <> {post.category} | )} {post.date?.start_date}
{' '} {post.tagItems.map(tag => ( ))}
{(!showPreview || showSummary) && !post.results && (

{post.summary}

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

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

)} {showPreview && post?.blockMap && (
)}
{locale.COMMON.ARTICLE_DETAIL}
{CONFIG_NEXT.POST_LIST_COVER && post?.page_cover && (
{post.title}
)}
) } export default BlogPostCard