diff --git a/lib/notion/getNotion.js b/lib/notion/getNotion.js index 3da84ee8..aad65379 100644 --- a/lib/notion/getNotion.js +++ b/lib/notion/getNotion.js @@ -16,7 +16,6 @@ export async function getNotion(pageId) { } const postInfo = blockMap?.block?.[idToUuid(pageId)].value - return { id: pageId, type: postInfo, @@ -26,7 +25,7 @@ export async function getNotion(pageId) { status: 'Published', createdTime: formatDate(new Date(postInfo.created_time).toString(), BLOG.LANG), lastEditedDay: formatDate(new Date(postInfo?.last_edited_time).toString(), BLOG.LANG), - fullWidth: false, + fullWidth: postInfo?.fullWidth, page_cover: getPageCover(postInfo), date: { start_date: formatDate(new Date(postInfo?.last_edited_time).toString(), BLOG.LANG) }, blockMap diff --git a/themes/hexo/components/PostHeader.js b/themes/hexo/components/PostHeader.js index 8a69b9ef..fb051e8f 100644 --- a/themes/hexo/components/PostHeader.js +++ b/themes/hexo/components/PostHeader.js @@ -12,6 +12,12 @@ export default function PostHeader({ post, siteInfo }) { if (!post) { return <>> } + + // 文章全屏隐藏标头 + if (post.fullWidth) { + return
+ } + const headerImage = post?.pageCover ? post.pageCover : siteInfo?.pageCover return ( diff --git a/themes/hexo/components/SideRight.js b/themes/hexo/components/SideRight.js index c5600eb4..497a7b2f 100644 --- a/themes/hexo/components/SideRight.js +++ b/themes/hexo/components/SideRight.js @@ -38,6 +38,12 @@ export default function SideRight(props) { } = props const { locale } = useGlobal() + + // 文章全屏处理 + if (post && post?.fullWidth) { + return null + } + return (