Merge pull request #692 from chasingboy95/tag-match-display-fix
fix non-english tags filter failed, display error
This commit is contained in:
commit
9eb8876eb7
@ -8,7 +8,7 @@ import { genPageMetadata } from 'app/seo'
|
||||
import { Metadata } from 'next'
|
||||
|
||||
export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> {
|
||||
const tag = params.tag
|
||||
const tag = decodeURI(params.tag)
|
||||
return genPageMetadata({
|
||||
title: tag,
|
||||
description: `${siteMetadata.title} ${tag} tagged content`,
|
||||
@ -31,7 +31,7 @@ export const generateStaticParams = async () => {
|
||||
}
|
||||
|
||||
export default function TagPage({ params }: { params: { tag: string } }) {
|
||||
const { tag } = params
|
||||
const tag = decodeURI(params.tag)
|
||||
// Capitalize first letter and convert space to dash
|
||||
const title = tag[0].toUpperCase() + tag.split(' ').join('-').slice(1)
|
||||
const filteredPosts = allCoreContent(
|
||||
|
Loading…
x
Reference in New Issue
Block a user