mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 15:10:29 +00:00
修复export格式下复杂url的访问bug
This commit is contained in:
@@ -30,17 +30,17 @@ export async function getStaticPaths() {
|
||||
|
||||
const from = 'slug-paths'
|
||||
const { allPages } = await getGlobalData({ from })
|
||||
|
||||
const paths = allPages
|
||||
?.filter(row => checkSlugHasMorThanTwoSlash(row))
|
||||
.map(row => ({
|
||||
params: {
|
||||
prefix: row.slug.split('/')[0],
|
||||
slug: row.slug.split('/')[1],
|
||||
suffix: row.slug.split('/').slice(2)
|
||||
}
|
||||
}))
|
||||
return {
|
||||
paths: allPages
|
||||
?.filter(row => checkSlugHasMorThanTwoSlash(row))
|
||||
.map(row => ({
|
||||
params: {
|
||||
prefix: row.slug.split('/')[0],
|
||||
slug: row.slug.split('/')[1],
|
||||
suffix: row.slug.split('/').slice(1)
|
||||
}
|
||||
})),
|
||||
paths: paths,
|
||||
fallback: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user