--- export interface OgImage { url: string; width: number; height: number; alt: string; type?: string; } interface Props { title: string; description: string; canonicalPath?: string; canonicalOverride?: string; ogType?: 'website' | 'article'; ogImage?: OgImage; noindex?: boolean; publishedTime?: Date; modifiedTime?: Date; articleTags?: string[]; jsonLd?: Record | Record[]; } const { title, description, canonicalPath, canonicalOverride, ogType = 'website', ogImage, noindex = false, publishedTime, modifiedTime, articleTags = [], jsonLd, } = Astro.props; const SITE_NAME = 'Unique'; const titleTag = title === SITE_NAME ? SITE_NAME : `${title} — ${SITE_NAME}`; const canonicalUrl = canonicalOverride ?? new URL(canonicalPath ?? Astro.url.pathname, Astro.site).href; const jsonLdBlocks = jsonLd ? Array.isArray(jsonLd) ? jsonLd : [jsonLd] : []; --- {titleTag} {noindex && } {ogImage && ( <> {ogImage.type && } )} {ogType === 'article' && publishedTime && ( )} {ogType === 'article' && modifiedTime && ( )} {ogType === 'article' && articleTags.map((t) => )} {ogImage && ( <> )} {jsonLdBlocks.map((block) => (