{配置兼容性}

This commit is contained in:
tangly1024
2024-06-15 10:34:55 +08:00
parent 2e983e4876
commit 19d9d896c4
5 changed files with 69 additions and 40 deletions

View File

@@ -6,7 +6,7 @@ import formatDate from '../utils/formatDate'
import md5 from 'js-md5'
import { siteConfig } from '../config'
import {
checkContainHttp,
checkStartWithHttp,
convertUrlStartWithOneSlash,
sliceUrlFromHttp
} from '../utils'
@@ -197,7 +197,7 @@ export function adjustPageProperties(properties, NOTION_CONFIG) {
}
// 检查处理外链
properties.href = checkContainHttp(properties?.href)
properties.href = checkStartWithHttp(properties?.href)
? sliceUrlFromHttp(properties?.href)
: convertUrlStartWithOneSlash(properties?.href)