import BLOG from '@/blog.config' import BlogAround from './BlogAround' import Comment from '@/components/Comment' import RecommendPosts from './RecommendPosts' import ShareBar from '@/components/ShareBar' import TagItem from './TagItem' import { useGlobal } from '@/lib/global' import Link from 'next/link' import { useRouter } from 'next/router' import ArticleCopyright from './ArticleCopyright' import WordCount from './WordCount' import NotionPage from '@/components/NotionPage' import CONFIG from '../config' import NotionIcon from '@/components/NotionIcon' import LazyImage from '@/components/LazyImage' import { formatDateFmt } from '@/lib/formatDate' import { siteConfig } from '@/lib/config' /** * * @param {*} param0 * @returns */ export default function ArticleDetail(props) { const { post, recommendPosts, prev, next } = props const url = BLOG.LINK + useRouter().asPath const { locale } = useGlobal() const showArticleInfo = CONFIG.ARTICLE_INFO return (
{showArticleInfo &&
{/* 头图 */} {CONFIG.POST_HEADER_IMAGE_VISIBLE && post?.type && !post?.type !== 'Page' && post?.pageCover && (
)} {/* title */}
{post.title}
{/* meta */}
{post?.type !== 'Page' && (<>
{post?.publishDay}
| {post.lastEditedDay}
)}
} {/* Notion内容主体 */}
{post && ()}
{showArticleInfo && <> {/* 分享 */} {/* 版权声明 */} {post?.type === 'Post' && } {/* 推荐文章 */} {post?.type === 'Post' && }
{/* 分类 */} {post.category && <>
<> {post.category}
} {/* 标签列表 */} {post?.type === 'Post' && ( <> {post.tagItems && (
{locale.COMMON.TAGS}:
{post.tagItems.map(tag => ( ))}
)} )}
{post?.type === 'Post' && } } {/* 评论互动 */}
) }