mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-25 15:09:54 +00:00
生产环境打包速度
This commit is contained in:
@@ -31,7 +31,9 @@ const Slug = ({ post, blockMap, tags, prev, next, allPosts, recommendPosts, cate
|
||||
|
||||
export async function getStaticPaths () {
|
||||
let posts = []
|
||||
posts = await getAllPosts({ from: 'slug - paths', includePage: true })
|
||||
if (BLOG.isProd) {
|
||||
posts = await getAllPosts({ from: 'slug - paths', includePage: true })
|
||||
}
|
||||
return {
|
||||
paths: posts.map(row => `${BLOG.path}/article/${row.slug}`),
|
||||
fallback: true
|
||||
|
||||
Reference in New Issue
Block a user