import Link from 'next/link' import BLOG from '@/blog.config' import NotionIcon from '@/components/NotionIcon' import WavesArea from './WavesArea' import { HashTag } from '@/components/HeroIcons' import WordCount from '@/components/WordCount' export default function PostHeader({ post, siteInfo }) { if (!post) { return <> } // 文章头图 const headerImage = post?.pageCover ? post.pageCover : siteInfo?.pageCover return (
{/* 文章背景图 */}
{/* eslint-disable-next-line @next/next/no-img-element */}
{/* 文章文字描述 */}
{/* 分类+标签 */}
{post.category && <>
{post.category}
} {post.tagItems && (
{post.tagItems.map((tag, index) => (
{tag.name + (tag.count ? `(${tag.count})` : '')}
))}
)}
{/* 文章Title */}
{post.title}
{/* 标题底部补充信息 */}
{post?.type !== 'Page' && ( <> {post?.publishTime} )}
{BLOG.ANALYTICS_BUSUANZI_ENABLE &&
}
) }