1 parent
0c8d74b21d
commit
a1e51e78f0
23 files changed
+522
-516
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { Metadata } from "next"
|
||||
import type { Meta, Pic } from "@/types"
|
||||
|
||||
export function meta(props: Partial<Meta>): Meta {
|
||||
@@ -80,3 +81,24 @@ export class MetaBuilder {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function buildMetadata(m: Meta): Metadata {
|
||||
return {
|
||||
title: m.title,
|
||||
description: m.description,
|
||||
openGraph: {
|
||||
url: m.url,
|
||||
title: m.title,
|
||||
description: m.description,
|
||||
siteName: m.siteName,
|
||||
locale: m.locale,
|
||||
type: m.type as "website",
|
||||
images: [{ url: m.image, width: m.imageWidth, height: m.imageHeight }],
|
||||
},
|
||||
twitter: {
|
||||
card: m.twitterCard as "summary_large_image",
|
||||
site: m.twitterSite,
|
||||
creator: m.twitterCreator,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user