fix lost of siteInfo and bg-cover

This commit is contained in:
tangly1024.com
2024-04-12 16:14:25 +08:00
parent 85fa2466fc
commit cf68df2435
2 changed files with 4 additions and 2 deletions

View File

@@ -251,7 +251,7 @@ function getCategoryOptions(schema) {
* @returns {Promise<{title,description,pageCover,icon}>}
*/
function getSiteInfo({ collection, block, NOTION_CONFIG, pageId }) {
if (!collection || !block || NOTION_CONFIG || pageId) {
if (!collection && !block) {
return {
title: BLOG.TITLE,
description: BLOG.DESCRIPTION,
@@ -267,8 +267,9 @@ function getSiteInfo({ collection, block, NOTION_CONFIG, pageId }) {
: BLOG.DESCRIPTION
const pageCover = collection?.cover
? mapImgUrl(collection?.cover, block[pageId]?.value)
? mapImgUrl(collection?.cover, collection, 'collection')
: BLOG.HOME_BANNER_IMAGE
// 用户头像压缩一下
let icon = compressImage(
collection?.icon

View File

@@ -522,6 +522,7 @@ summary > .notion-h {
.notion-page {
/* width: var(--notion-max-width); */
width: 100% !important;
padding-left: calc(min(12px, 8vw));
padding-right: calc(min(12px, 8vw));
}