upstream #1
| @@ -32,6 +32,9 @@ export const metadata: Metadata = { | ||||
|   }, | ||||
|   alternates: { | ||||
|     canonical: './', | ||||
|     types: { | ||||
|       'application/rss+xml': `${siteMetadata.siteUrl}/feed.xml`, | ||||
|     }, | ||||
|   }, | ||||
|   robots: { | ||||
|     index: true, | ||||
|   | ||||
| @@ -5,9 +5,11 @@ interface PageSEOProps { | ||||
|   title: string | ||||
|   description?: 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 { | ||||
|     title, | ||||
|     openGraph: { | ||||
| @@ -24,5 +26,6 @@ export function genPageMetadata({ title, description, image }: PageSEOProps): Me | ||||
|       card: 'summary_large_image', | ||||
|       images: image ? [image] : [siteMetadata.socialBanner], | ||||
|     }, | ||||
|     ...rest, | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -8,7 +8,16 @@ import { Metadata } from 'next' | ||||
|  | ||||
| export async function generateMetadata({ params }: { params: { tag: string } }): Promise<Metadata> { | ||||
|   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 () => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user