diff --git a/lib/notion/getPageProperties.js b/lib/notion/getPageProperties.js index 185bc008..1d4554df 100644 --- a/lib/notion/getPageProperties.js +++ b/lib/notion/getPageProperties.js @@ -172,5 +172,9 @@ function generateCustomizeUrl(postProperties) { fullSlug += '/' } }) + if (fullSlug.startsWith('/')) { + fullSlug = fullSlug.substring(1) // 去掉头部的"/" + } + return `${fullSlug}/${(postProperties.slug ?? postProperties.id)}` }