Merge remote-tracking branch 'origin/main' into dynamic-theme

This commit is contained in:
tangly1024
2022-03-09 17:41:57 +08:00
24 changed files with 230 additions and 85 deletions

View File

@@ -29,8 +29,10 @@ export async function getStaticPaths () {
const from = 'slug-paths'
const { allPosts } = await getGlobalNotionData({ from, pageType: ['Page'] })
const filterPosts = allPosts?.filter(e => e?.slug?.indexOf('http') !== 0) || []
return {
paths: allPosts.map(row => ({ params: { slug: row.slug } })),
paths: filterPosts.map(row => ({ params: { slug: row.slug } })),
fallback: true
}
}