mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
bugfix:
静态编译[tag]
This commit is contained in:
@@ -51,13 +51,10 @@ export async function getStaticPaths () {
|
||||
const from = 'tag-static-path'
|
||||
const notionPageData = await getNotionPageData({ from })
|
||||
const posts = await getAllPosts({ notionPageData, from })
|
||||
const categories = await getAllCategories(posts)
|
||||
|
||||
// const tagOptions = notionPageData.tagOptions
|
||||
// tags = await getAllTags({ posts, tagOptions, sliceCount: 0 })
|
||||
const tagOptions = notionPageData.tagOptions
|
||||
const tags = await getAllTags({ posts, tagOptions, sliceCount: 0 })
|
||||
return {
|
||||
paths: Object.keys(categories).map(category => ({ params: { category } })),
|
||||
// paths: tags.map(t => ({ params: { tag: t.name } })),
|
||||
paths: tags.map(t => ({ params: { tag: t.name } })),
|
||||
fallback: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user