From 8c25823edec8c56670751a0c798d386f26e260be Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 30 Apr 2024 18:21:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/[prefix]/[slug]/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/[prefix]/[slug]/index.js b/pages/[prefix]/[slug]/index.js index 4d889d64..072a932c 100644 --- a/pages/[prefix]/[slug]/index.js +++ b/pages/[prefix]/[slug]/index.js @@ -26,6 +26,7 @@ export async function getStaticPaths() { const from = 'slug-paths' const { allPages } = await getGlobalData({ from }) + // 根据slug中的 / 分割成prefix和slug两个字段 ; 例如 article/test const paths = allPages ?.filter(row => checkSlug(row)) .map(row => ({