mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 15:09:28 +00:00
修复文章前缀问题,支持空字符串
This commit is contained in:
@@ -243,10 +243,14 @@ function generateCustomizeSlug(postProperties, NOTION_CONFIG) {
|
||||
return postProperties.slug
|
||||
}
|
||||
let fullPrefix = ''
|
||||
const allSlugPatterns =
|
||||
NOTION_CONFIG?.POST_URL_PREFIX ||
|
||||
siteConfig('POST_URL_PREFIX', '', NOTION_CONFIG).split('/')
|
||||
|
||||
let allSlugPatterns = NOTION_CONFIG?.POST_URL_PREFIX
|
||||
if (allSlugPatterns === undefined) {
|
||||
allSlugPatterns = siteConfig('POST_URL_PREFIX', '', NOTION_CONFIG).split(
|
||||
'/'
|
||||
)
|
||||
} else {
|
||||
allSlugPatterns = allSlugPatterns.split('/')
|
||||
}
|
||||
const POST_URL_PREFIX_MAPPING_CATEGORY = siteConfig(
|
||||
'POST_URL_PREFIX_MAPPING_CATEGORY',
|
||||
{},
|
||||
|
||||
Reference in New Issue
Block a user