From 3d68b35cb6cc5f737330b8ea2e664083825135ad Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 27 Sep 2024 16:11:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getPageProperties.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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}` } }