diff --git a/lib/notion/getPageProperties.js b/lib/notion/getPageProperties.js index 53d7ce87..a946164b 100644 --- a/lib/notion/getPageProperties.js +++ b/lib/notion/getPageProperties.js @@ -6,9 +6,9 @@ import formatDate from '../utils/formatDate' import md5 from 'js-md5' import { siteConfig } from '../config' import { - checkStartWithHttp, - convertUrlStartWithOneSlash, - getLastSegmentFromUrl + checkStartWithHttp, + convertUrlStartWithOneSlash, + getLastSegmentFromUrl } from '../utils' import { extractLangPrefix } from '../utils/pageId' import { mapImgUrl } from './mapImage' @@ -291,9 +291,9 @@ function generateCustomizeSlug(postProperties, NOTION_CONFIG) { fullPrefix = fullPrefix.substring(0, fullPrefix.length - 1) // 去掉尾部部的"/" } - if(fullPrefix){ + if (fullPrefix) { return `${fullPrefix}/${postProperties.slug ?? postProperties.id}` - }else{ + } else { return `${postProperties.slug ?? postProperties.id}` } }