From 30e77eda9a8ad70fb9389046abaf9e903c61f2cc Mon Sep 17 00:00:00 2001 From: ray-android <163275631+ray-android@users.noreply.github.com> Date: Wed, 31 Jul 2024 01:01:48 +0800 Subject: [PATCH 1/3] Fix issue #988 Fix Invalid Tag Page Returns Status 200 Instead of 404 #988 --- app/tags/[tag]/page.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/tags/[tag]/page.tsx b/app/tags/[tag]/page.tsx index d2cab3f96..94a3dd226 100644 --- a/app/tags/[tag]/page.tsx +++ b/app/tags/[tag]/page.tsx @@ -6,6 +6,7 @@ import { allBlogs } from 'contentlayer/generated' import tagData from 'app/tag-data.json' import { genPageMetadata } from 'app/seo' import { Metadata } from 'next' +import { notFound } from 'next/navigation' export async function generateMetadata({ params }: { params: { tag: string } }): Promise { const tag = decodeURI(params.tag) @@ -37,5 +38,8 @@ export default function TagPage({ params }: { params: { tag: string } }) { const filteredPosts = allCoreContent( sortPosts(allBlogs.filter((post) => post.tags && post.tags.map((t) => slug(t)).includes(tag))) ) + if (filteredPosts.length === 0) { + return notFound() + } return } From f04fc9d38b27c4a6e566e93d6beec36e80481b30 Mon Sep 17 00:00:00 2001 From: ray-android <163275631+ray-android@users.noreply.github.com> Date: Wed, 31 Jul 2024 01:14:00 +0800 Subject: [PATCH 2/3] Resolve Issue #990 Resolve Add Accessible Name to Theme Switcher Button #990 --- components/ThemeSwitch.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ThemeSwitch.tsx b/components/ThemeSwitch.tsx index 4693210a4..79079e37f 100644 --- a/components/ThemeSwitch.tsx +++ b/components/ThemeSwitch.tsx @@ -57,7 +57,7 @@ const ThemeSwitch = () => {
- + {mounted ? resolvedTheme === 'dark' ? : : }
From ff5c15e4545f116020c61dbd9ccd5c5a3f87ef30 Mon Sep 17 00:00:00 2001 From: Benson Macharia Date: Wed, 7 Aug 2024 11:33:51 +0300 Subject: [PATCH 3/3] Update README.md to add website bmacharia.com Update README.md to add website bmacharia.com --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 76e3d8d9a..5ebedd511 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ Internationalization support - [Template with i18n](https://tailwind-nextjs-star - [Rulli Damara Putra's Portfolio](https://www.damaraputra.my.id/) - Rully's personal blog and portfolio. - [blog.taoluyuan.com 套路猿](https://blog.taoluyuan.com) - A personal tech blog that supports multi-theme switching. 「中英」 - [LyricsDecode.com](https://lyricsdecode.com) - A song lyrics website offering original lyrics, Romanisation, and English translations with customisable viewing options. +- [bmacharia.com](https://bmacharia.com/) - Benson Macharia's technical blog about Cybersecurity and IT Risk Management. Using the template? Feel free to create a PR and add your blog to this list.