File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { BlogCard } from "./blog-card"
1111import { BlogMdxContent } from "./mdx-types"
1212import { FeaturedBlogPosts } from "./featured-blog-posts"
1313import { tagColors } from "@/app/conf/_design-system/tag-colors"
14+ import { blogCategories } from "./blog-categories"
1415
1516const mask = `url(${ new URL ( "./blur-bean.webp" , import . meta. url ) . href } )`
1617
@@ -61,6 +62,11 @@ export function BlogPage({
6162 < h3 className = "typography-menu" > Categories</ h3 >
6263 < ul className = "mt-4 flex gap-2 pb-2 max-sm:overflow-auto sm:flex-wrap" >
6364 { Object . entries ( tags )
65+ . filter ( ( [ tag ] ) =>
66+ // we generate pages for all tags, but link only to a selected subset
67+ // to avoid category pages with 1 post
68+ ( blogCategories as readonly string [ ] ) . includes ( tag ) ,
69+ )
6470 . sort ( ( a , b ) => b [ 1 ] - a [ 1 ] )
6571 . map ( ( [ tag , count ] , i ) => (
6672 < NextLink
You can’t perform that action at this time.
0 commit comments