本地编译优化
This commit is contained in:
tangly1024
2021-12-15 12:36:52 +08:00
parent de99bb7a5d
commit f8694456ef
3 changed files with 77 additions and 11 deletions

View File

@@ -152,10 +152,7 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, allPosts, categories
}
export async function getStaticPaths () {
let posts = []
if (BLOG.isProd) {
posts = await getAllPosts({ from: 'slug - paths', includePage: true })
}
const posts = await getAllPosts({ from: 'slug - paths', includePage: true })
return {
paths: posts.map(row => `${BLOG.path}/article/${row.slug}`),
fallback: true