--- import { WEBMENTION_PINGBACK, WEBMENTION_URL } from "astro:env/client"; import { siteConfig } from "@/site.config"; import type { SiteMeta } from "@/types"; import "@/styles/global.css"; type Props = SiteMeta; const { articleDate, description, ogImage, title, lang } = Astro.props; const titleSeparator = "•"; const siteTitle = `${title} ${titleSeparator} ${siteConfig.title}`; const canonicalURL = new URL(Astro.url.pathname, Astro.site); const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url).href; // Map ISO 639-1 language codes to og:locale format function getOgLocale(langCode?: string): string { if (!langCode) return siteConfig.ogLocale; const localeMap: Record = { en: "en_US", pl: "pl_PL", es: "es_ES", fr: "fr_FR", de: "de_DE", it: "it_IT", pt: "pt_PT", nl: "nl_NL", ru: "ru_RU", ja: "ja_JP", zh: "zh_CN", ko: "ko_KR", }; return localeMap[langCode] || siteConfig.ogLocale; } const ogLocale = getOgLocale(lang); --- {siteTitle} {/* Icons */} { import.meta.env.PROD && ( <> {/* Favicon & Apple Icon */} {/* Manifest */} ) } {/* Canonical URL */} {/* Primary Meta Tags */} {/* Open Graph / Facebook */} { articleDate && ( <> ) } {/* Twitter */} {/* Sitemap */} {/* RSS auto-discovery */} {/* Webmentions */} { WEBMENTION_URL && ( <> {WEBMENTION_PINGBACK && } ) } {/* Plausible Analytics */}