mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 15:09:36 +00:00
Merge branch 'main' into feat/post/extract-page-content
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 文章相关工具
|
||||
*/
|
||||
import { checkStartWithHttp } from '.'
|
||||
import { isHttpLink } from '.'
|
||||
import { getPostBlocks } from '@/lib/db/getSiteData'
|
||||
import { getPageTableOfContents } from '@/lib/notion/getPageTableOfContents'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
@@ -59,7 +59,7 @@ export function checkSlugHasNoSlash(row) {
|
||||
}
|
||||
return (
|
||||
(slug.match(/\//g) || []).length === 0 &&
|
||||
!checkStartWithHttp(slug) &&
|
||||
!isHttpLink(slug) &&
|
||||
row.type.indexOf('Menu') < 0
|
||||
)
|
||||
}
|
||||
@@ -76,7 +76,7 @@ export function checkSlugHasOneSlash(row) {
|
||||
}
|
||||
return (
|
||||
(slug.match(/\//g) || []).length === 1 &&
|
||||
!checkStartWithHttp(slug) &&
|
||||
!isHttpLink(slug) &&
|
||||
row.type.indexOf('Menu') < 0
|
||||
)
|
||||
}
|
||||
@@ -94,7 +94,7 @@ export function checkSlugHasMorThanTwoSlash(row) {
|
||||
return (
|
||||
(slug.match(/\//g) || []).length >= 2 &&
|
||||
row.type.indexOf('Menu') < 0 &&
|
||||
!checkStartWithHttp(slug)
|
||||
!isHttpLink(slug)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user