--- import { Font } from "astro:assets"; import { SITE_DESCRIPTION, SITE_TITLE } from "../consts"; import type { PageMetadata } from "../types"; interface Props { metadata: PageMetadata; } const { metadata } = Astro.props; const { title, description = SITE_DESCRIPTION, canonicalURL: canonicalOverride, socialImage: socialImageOverride = "/og.png", type = "website", robots = "index, follow", publicationDate, modificationDate, } = metadata; const isIndexable = robots === "index, follow"; const canonicalURL = new URL( canonicalOverride ?? Astro.url.pathname, Astro.site, ); const socialImage = new URL(socialImageOverride, Astro.site); --- {isIndexable && } {title} { isIndexable && ( <> {/* Open Graph / Facebook */} {type === "article" && publicationDate && ( )} {type === "article" && modificationDate && ( )} {/* Twitter */} ) }