修复部分NOTION_CONFIG读取问题

This commit is contained in:
tangly1024.com
2024-05-15 14:55:14 +08:00
parent 70e53649b3
commit 517a967640
44 changed files with 911 additions and 565 deletions

View File

@@ -236,12 +236,13 @@ function getCategoryOptions(schema) {
* @param from
* @returns {Promise<{title,description,pageCover,icon}>}
*/
function getSiteInfo({ collection, block, NOTION_CONFIG, pageId }) {
const defaultTitle = siteConfig('TITLE', '', NOTION_CONFIG)
const defaultDescription = siteConfig('DESCRIPTION', '', NOTION_CONFIG)
const defaultPageCover = siteConfig('HOME_BANNER_IMAGE', '', NOTION_CONFIG)
const defaultIcon = siteConfig('AVATAR', '', NOTION_CONFIG)
const defaultLink = siteConfig('LINK', '', NOTION_CONFIG)
function getSiteInfo({ collection, block, NOTION_CONFIG }) {
const defaultTitle = NOTION_CONFIG?.TITLE || BLOG.TITLE
const defaultDescription = NOTION_CONFIG?.DESCRIPTION || BLOG.DESCRIPTION
const defaultPageCover =
NOTION_CONFIG?.HOME_BANNER_IMAGE || BLOG.HOME_BANNER_IMAGE
const defaultIcon = NOTION_CONFIG?.AVATAR || BLOG.AVATAR
const defaultLink = NOTION_CONFIG?.LINK || BLOG.LINK
if (!collection && !block) {
return {
title: defaultTitle,