upstream #1

Merged
jblu merged 1007 commits from upstream into main 2024-11-04 22:35:57 -06:00
3 changed files with 6 additions and 1 deletions
Showing only changes of commit bb81935f0c - Show all commits

View File

@ -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. - [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. 「中英」 - [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. - [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. Using the template? Feel free to create a PR and add your blog to this list.

View File

@ -6,6 +6,7 @@ import { allBlogs } from 'contentlayer/generated'
import tagData from 'app/tag-data.json' import tagData from 'app/tag-data.json'
import { genPageMetadata } from 'app/seo' import { genPageMetadata } from 'app/seo'
import { Metadata } from 'next' import { Metadata } from 'next'
import { notFound } from 'next/navigation'
export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> { export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> {
const tag = decodeURI(params.tag) const tag = decodeURI(params.tag)
@ -37,5 +38,8 @@ export default function TagPage({ params }: { params: { tag: string } }) {
const filteredPosts = allCoreContent( const filteredPosts = allCoreContent(
sortPosts(allBlogs.filter((post) => post.tags && post.tags.map((t) => slug(t)).includes(tag))) sortPosts(allBlogs.filter((post) => post.tags && post.tags.map((t) => slug(t)).includes(tag)))
) )
if (filteredPosts.length === 0) {
return notFound()
}
return <ListLayout posts={filteredPosts} title={title} /> return <ListLayout posts={filteredPosts} title={title} />
} }

View File

@ -57,7 +57,7 @@ const ThemeSwitch = () => {
<div className="mr-5 flex items-center"> <div className="mr-5 flex items-center">
<Menu as="div" className="relative inline-block text-left"> <Menu as="div" className="relative inline-block text-left">
<div className="flex items-center justify-center hover:text-primary-500 dark:hover:text-primary-400"> <div className="flex items-center justify-center hover:text-primary-500 dark:hover:text-primary-400">
<Menu.Button> <Menu.Button aria-label="Theme switcher">
{mounted ? resolvedTheme === 'dark' ? <Moon /> : <Sun /> : <Blank />} {mounted ? resolvedTheme === 'dark' ? <Moon /> : <Sun /> : <Blank />}
</Menu.Button> </Menu.Button>
</div> </div>