mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Merge pull request #2536 from tangly1024/fix/article-url-in-page-2
修复第二页url
This commit is contained in:
@@ -188,7 +188,7 @@ export function adjustPageProperties(properties, NOTION_CONFIG) {
|
||||
}
|
||||
|
||||
// http or https 开头的视为外链
|
||||
if (checkStartWithHttp(properties?.slug)) {
|
||||
if (checkStartWithHttp(properties?.href)) {
|
||||
properties.href = properties?.slug
|
||||
properties.target = '_blank'
|
||||
} else {
|
||||
@@ -197,7 +197,6 @@ export function adjustPageProperties(properties, NOTION_CONFIG) {
|
||||
if (siteConfig('PSEUDO_STATIC', false, NOTION_CONFIG)) {
|
||||
if (
|
||||
!properties?.href?.endsWith('.html') &&
|
||||
!properties?.href?.startsWith('http') &&
|
||||
properties?.href !== '' &&
|
||||
properties?.href !== '#' &&
|
||||
properties?.href !== '/'
|
||||
@@ -205,8 +204,9 @@ export function adjustPageProperties(properties, NOTION_CONFIG) {
|
||||
properties.href += '.html'
|
||||
}
|
||||
}
|
||||
|
||||
// 相对路径转绝对路径:url左侧拼接 /
|
||||
convertUrlStartWithOneSlash(properties?.href)
|
||||
properties.href = convertUrlStartWithOneSlash(properties?.href)
|
||||
}
|
||||
|
||||
// 如果跳转链接是多语言,则在新窗口打开
|
||||
|
||||
Reference in New Issue
Block a user