import Link from 'next/link' import { siteConfig } from '@/lib/config' import NotionIcon from '@/components/NotionIcon' import WavesArea from './WavesArea' import { HashTag } from '@/components/HeroIcons' import WordCount from '@/components/WordCount' import LazyImage from '@/components/LazyImage' import { formatDateFmt } from '@/lib/formatDate' export default function PostHeader({ post, siteInfo }) { if (!post) { return <> } // 文章头图 const headerImage = post?.pageCover ? post.pageCover : siteInfo?.pageCover return (
{/* 文章背景图 */}
{/* 文章文字描述 */}
{/* 分类+标签 */}
{post.category && <>
{post.category}
} {post.tagItems && (
{post.tagItems.map((tag, index) => (
{tag.name + (tag.count ? `(${tag.count})` : '')}
))}
)}
{/* 文章Title */}
{post.title}
{/* 标题底部补充信息 */}
{post?.type !== 'Page' && ( <> {post?.publishDay} )}
{post.lastEditedDay}
{JSON.parse(siteConfig('ANALYTICS_BUSUANZI_ENABLE')) &&
}
) }