--- import { LOCALE, SITE } from "@config"; import "@styles/base.css"; import { ViewTransitions } from "astro:transitions"; const googleSiteVerification = import.meta.env.PUBLIC_GOOGLE_SITE_VERIFICATION; export interface Props { title?: string; author?: string; profile?: string; description?: string; ogImage?: string; canonicalURL?: string; pubDatetime?: Date; modDatetime?: Date | null; scrollSmooth?: boolean; } const { title = SITE.title, author = SITE.author, profile = SITE.profile, description = SITE.desc, ogImage = SITE.ogImage, canonicalURL = new URL(Astro.url.pathname, Astro.site).href, pubDatetime, modDatetime, scrollSmooth = false, } = Astro.props; const socialImageURL = new URL( ogImage ?? SITE.ogImage ?? "og.png", Astro.url.origin ).href; const structuredData = { "@context": "https://schema.org", "@type": "BlogPosting", headline: `${title}`, image: `${socialImageURL}`, datePublished: `${pubDatetime?.toISOString()}`, ...(modDatetime && { dateModified: modDatetime.toISOString() }), author: [ { "@type": "Person", name: `${author}`, url: `${profile}`, }, ], }; --- {title} { pubDatetime && ( ) } { modDatetime && ( ) }