upstream #1
@ -8,7 +8,7 @@ import { genPageMetadata } from 'app/seo'
|
|||||||
import { Metadata } from 'next'
|
import { Metadata } from 'next'
|
||||||
|
|
||||||
export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> {
|
export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> {
|
||||||
const tag = params.tag
|
const tag = decodeURI(params.tag)
|
||||||
return genPageMetadata({
|
return genPageMetadata({
|
||||||
title: tag,
|
title: tag,
|
||||||
description: `${siteMetadata.title} ${tag} tagged content`,
|
description: `${siteMetadata.title} ${tag} tagged content`,
|
||||||
@ -31,7 +31,7 @@ export const generateStaticParams = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function TagPage({ params }: { params: { tag: string } }) {
|
export default function TagPage({ params }: { params: { tag: string } }) {
|
||||||
const { tag } = params
|
const tag = decodeURI(params.tag)
|
||||||
// Capitalize first letter and convert space to dash
|
// Capitalize first letter and convert space to dash
|
||||||
const title = tag[0].toUpperCase() + tag.split(' ').join('-').slice(1)
|
const title = tag[0].toUpperCase() + tag.split(' ').join('-').slice(1)
|
||||||
const filteredPosts = allCoreContent(
|
const filteredPosts = allCoreContent(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user