upstream #1
@ -32,6 +32,9 @@ export const metadata: Metadata = {
|
|||||||
},
|
},
|
||||||
alternates: {
|
alternates: {
|
||||||
canonical: './',
|
canonical: './',
|
||||||
|
types: {
|
||||||
|
'application/rss+xml': `${siteMetadata.siteUrl}/feed.xml`,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
robots: {
|
robots: {
|
||||||
index: true,
|
index: true,
|
||||||
|
@ -5,9 +5,11 @@ interface PageSEOProps {
|
|||||||
title: string
|
title: string
|
||||||
description?: string
|
description?: string
|
||||||
image?: string
|
image?: string
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
[key: string]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
export function genPageMetadata({ title, description, image }: PageSEOProps): Metadata {
|
export function genPageMetadata({ title, description, image, ...rest }: PageSEOProps): Metadata {
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
openGraph: {
|
openGraph: {
|
||||||
@ -24,5 +26,6 @@ export function genPageMetadata({ title, description, image }: PageSEOProps): Me
|
|||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
images: image ? [image] : [siteMetadata.socialBanner],
|
images: image ? [image] : [siteMetadata.socialBanner],
|
||||||
},
|
},
|
||||||
|
...rest,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,16 @@ 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 = params.tag
|
||||||
return genPageMetadata({ title: tag, description: `${siteMetadata.title} ${tag} tagged content` })
|
return genPageMetadata({
|
||||||
|
title: tag,
|
||||||
|
description: `${siteMetadata.title} ${tag} tagged content`,
|
||||||
|
alternates: {
|
||||||
|
canonical: './',
|
||||||
|
types: {
|
||||||
|
'application/rss+xml': `${siteMetadata.siteUrl}/tags/${tag}/feed.xml`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateStaticParams = async () => {
|
export const generateStaticParams = async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user