diff --git a/lib/notion/getNotionConfig.js b/lib/notion/getNotionConfig.js index ef319105..7a754386 100644 --- a/lib/notion/getNotionConfig.js +++ b/lib/notion/getNotionConfig.js @@ -9,7 +9,6 @@ import { getDateValue, getTextContent } from 'notion-utils' import { getPostBlocks } from './getPostBlocks' import getAllPageIds from './getAllPageIds' -import BLOG from '@/blog.config' /** * 从Notion中读取Config配置表 @@ -18,7 +17,7 @@ import BLOG from '@/blog.config' */ export async function getConfigMapFromConfigPage(allPages) { // 默认返回配置文件 - const notionConfig = BLOG + const notionConfig = {} if (!allPages || !Array.isArray(allPages) || allPages.length === 0) { console.warn('[Notion配置] 忽略的配置') diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index 39478d5b..5b77e716 100755 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -285,7 +285,7 @@ async function getDataBaseInfoByNotionAPI({ pageId, from }) { }) // 站点配置优先读取配置表格,否则读取blog.config.js 文件 - const NOTION_CONFIG = await getConfigMapFromConfigPage(collectionData) || BLOG + const NOTION_CONFIG = await getConfigMapFromConfigPage(collectionData) || {} // Sort by date if (BLOG.POSTS_SORT_BY === 'date') { diff --git a/themes/heo/components/InfoCard.js b/themes/heo/components/InfoCard.js index 689acc81..fd659aa3 100644 --- a/themes/heo/components/InfoCard.js +++ b/themes/heo/components/InfoCard.js @@ -17,15 +17,15 @@ export function InfoCard(props) { const { siteInfo, notice } = props const router = useRouter() // 在文章详情页特殊处理 - const isSlugPage = router.pathname === '/[...slug]' - + const isSlugPage = router.pathname.indexOf('/[prefix]') === 0 + console.log('TITLE:', siteConfig('TITLE')) return ( {/* 信息卡牌第一行 */}
{/* 问候语 */} -
+