支持外部链接跳转

This commit is contained in:
tangly1024
2022-03-08 15:24:57 +08:00
parent 3e22d62af5
commit e2502981ce
2 changed files with 8 additions and 2 deletions

View File

@@ -26,8 +26,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
}
}