From 61a467c614dde1454836aa7d0ea3a2228e6ca536 Mon Sep 17 00:00:00 2001 From: Ylarod Date: Wed, 7 Dec 2022 21:40:08 +0800 Subject: [PATCH] fix vercel build --- pages/[...slug].js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/[...slug].js b/pages/[...slug].js index 7305bf04..b16fff72 100644 --- a/pages/[...slug].js +++ b/pages/[...slug].js @@ -98,7 +98,9 @@ export async function getStaticProps({ params: { slug } }) { let fullSlug = slug.join('/') console.log('[读取Notion]', fullSlug) if (BLOG.PSEUDO_STATIC) { - fullSlug += '.html' + if (!fullSlug.endsWith('.html')) { + fullSlug += '.html' + } } const from = `slug-props-${fullSlug}` const props = await getGlobalNotionData({ from })