diff options
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/createOgImage.ts | 2 | ||||
| -rw-r--r-- | src/utils/schemas/pageSchema.ts | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/utils/createOgImage.ts b/src/utils/createOgImage.ts index da2cece..67731a7 100644 --- a/src/utils/createOgImage.ts +++ b/src/utils/createOgImage.ts @@ -5,7 +5,7 @@ import { Resvg } from "@resvg/resvg-js"; import dayjs from "dayjs"; import satori from "satori"; -export async function createOgImage(title: string, datePublished: Date): Promise<Buffer> { +export async function createOgImage(title: string, datePublished: Date): Promise<Uint8Array> { const formattedDate = dayjs(datePublished).format("MMMM DD, YYYY"); const markup = await satori( diff --git a/src/utils/schemas/pageSchema.ts b/src/utils/schemas/pageSchema.ts index ba8fd86..2305986 100644 --- a/src/utils/schemas/pageSchema.ts +++ b/src/utils/schemas/pageSchema.ts @@ -4,14 +4,13 @@ import { personId, websiteId } from "./ids"; export type WebsiteSchemaParams = { readonly description: string; readonly lang: string; - readonly mainEntityId?: string; readonly page: string; readonly siteUrl: string; readonly title: string; readonly type?: "WebPage" | "ProfilePage"; }; -export default ({ siteUrl, page, title, description, lang, type = "WebPage", mainEntityId }: WebsiteSchemaParams): WebPage | ProfilePage => { +export default ({ siteUrl, page, title, description, lang, type = "WebPage" }: WebsiteSchemaParams): WebPage | ProfilePage => { const url = new URL(page, siteUrl).toString(); const base = { @@ -28,7 +27,7 @@ export default ({ siteUrl, page, title, description, lang, type = "WebPage", mai return { ...base, "@type": "ProfilePage", - "mainEntity": { "@id": mainEntityId ?? personId(siteUrl) }, + "mainEntity": { "@id": personId(siteUrl) }, }; } |
