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 => ({