From 9fa9be6377b3d823a42506105ef2e23ecc7cc8a3 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 16 Dec 2021 17:41:13 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E9=9D=99=E6=80=81=E7=BC=96=E8=AF=91[?= =?UTF-8?q?tag]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tag/[tag].js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pages/tag/[tag].js b/pages/tag/[tag].js index 8299bc3f..a12f4643 100644 --- a/pages/tag/[tag].js +++ b/pages/tag/[tag].js @@ -51,13 +51,10 @@ export async function getStaticPaths () { const from = 'tag-static-path' const notionPageData = await getNotionPageData({ from }) const posts = await getAllPosts({ notionPageData, from }) - const categories = await getAllCategories(posts) - - // const tagOptions = notionPageData.tagOptions - // tags = await getAllTags({ posts, tagOptions, sliceCount: 0 }) + const tagOptions = notionPageData.tagOptions + const tags = await getAllTags({ posts, tagOptions, sliceCount: 0 }) return { - paths: Object.keys(categories).map(category => ({ params: { category } })), - // paths: tags.map(t => ({ params: { tag: t.name } })), + paths: tags.map(t => ({ params: { tag: t.name } })), fallback: true } }