mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
bugfix:
静态编译[tag]
This commit is contained in:
@@ -51,13 +51,10 @@ export async function getStaticPaths () {
|
|||||||
const from = 'tag-static-path'
|
const from = 'tag-static-path'
|
||||||
const notionPageData = await getNotionPageData({ from })
|
const notionPageData = await getNotionPageData({ from })
|
||||||
const posts = await getAllPosts({ notionPageData, from })
|
const posts = await getAllPosts({ notionPageData, from })
|
||||||
const categories = await getAllCategories(posts)
|
const tagOptions = notionPageData.tagOptions
|
||||||
|
const tags = await getAllTags({ posts, tagOptions, sliceCount: 0 })
|
||||||
// const tagOptions = notionPageData.tagOptions
|
|
||||||
// tags = await getAllTags({ posts, tagOptions, sliceCount: 0 })
|
|
||||||
return {
|
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
|
fallback: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user