From 2f42c21dbb4900c7769dbd47f2927eaa70d13940 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 9 May 2024 11:45:33 +0800 Subject: [PATCH] log --- pages/[prefix]/[slug]/index.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pages/[prefix]/[slug]/index.js b/pages/[prefix]/[slug]/index.js index 1d27113d..2c844eba 100644 --- a/pages/[prefix]/[slug]/index.js +++ b/pages/[prefix]/[slug]/index.js @@ -2,11 +2,7 @@ import BLOG from '@/blog.config' import { siteConfig } from '@/lib/config' import { getGlobalData, getPost, getPostBlocks } from '@/lib/db/getSiteData' import { uploadDataToAlgolia } from '@/lib/plugins/algolia' -import { - checkSlugHasNoSlash, - checkSlugHasOneSlash, - getRecommendPost -} from '@/lib/utils/post' +import { checkSlugHasOneSlash, getRecommendPost } from '@/lib/utils/post' import { idToUuid } from 'notion-utils' import Slug from '..' @@ -42,13 +38,6 @@ export async function getStaticPaths() { // 增加一种访问路径 允许通过 [category]/[slug] 访问文章 // 例如文章slug 是 test ,然后文章的分类category是 production // 则除了 [domain]/[slug] 以外,还支持分类名访问: [domain]/[category]/[slug] - console.log( - allPages - ?.filter(row => checkSlugHasNoSlash(row) && row.category) - .map(row => ({ - params: { prefix: row.category, slug: row.slug } - })) - ) return { paths: paths,