mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 07:26:45 +00:00
feature:
分页预渲染,分页组件优化
This commit is contained in:
@@ -31,9 +31,7 @@ export async function getStaticPaths () {
|
||||
const totalPages = Math.ceil(allPosts / BLOG.postsPerPage)
|
||||
return {
|
||||
// remove first page, we 're not gonna handle that.
|
||||
paths: Array.from({ length: totalPages - 1 }, (_, i) => ({
|
||||
params: { page: '' + (i + 2) }
|
||||
})),
|
||||
paths: Array.from({ length: totalPages - 1 }, (_, i) => `/page/${(i + 2)}`),
|
||||
fallback: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user