diff --git a/lib/notion/getNotionConfig.js b/lib/notion/getNotionConfig.js index 2bdf34db294..9a8c5072350 100644 --- a/lib/notion/getNotionConfig.js +++ b/lib/notion/getNotionConfig.js @@ -157,8 +157,8 @@ export async function getConfigMapFromConfigPage(allPages) { // 只导入生效的配置 if (config.enable) { // console.log('[Notion配置]', config.key, config.value) - notionConfig[config.key] = config.value || '' - // 配置不能是undefined,至少是空字符串 + notionConfig[config.key] = config.value || null + // 配置不能是undefined,至少是null } } } diff --git a/lib/notion/getPageProperties.js b/lib/notion/getPageProperties.js index 44f050c54b4..f2690821829 100644 --- a/lib/notion/getPageProperties.js +++ b/lib/notion/getPageProperties.js @@ -245,12 +245,15 @@ function generateCustomizeSlug(postProperties, NOTION_CONFIG) { let fullPrefix = '' let allSlugPatterns = NOTION_CONFIG?.POST_URL_PREFIX if (allSlugPatterns === undefined) { - allSlugPatterns = siteConfig('POST_URL_PREFIX', '', NOTION_CONFIG).split( - '/' - ) + allSlugPatterns = siteConfig( + 'POST_URL_PREFIX', + BLOG.POST_URL_PREFIX, + NOTION_CONFIG + ).split('/') } else { allSlugPatterns = allSlugPatterns.split('/') } + const POST_URL_PREFIX_MAPPING_CATEGORY = siteConfig( 'POST_URL_PREFIX_MAPPING_CATEGORY', {},