--- import '../styles/global.css'; interface Props { title?: string; description?: string; canonical?: string; ogImage?: string; noindex?: boolean; } const SITE = 'https://info-canicule.nocleus.com'; const { title = 'Info Canicule — Vigilance météo France en temps réel', description = 'Suivi gratuit et sans publicité des alertes Vigilance Météo France (canicule, orages, tempêtes), avec carte interactive par département et conseils officiels.', canonical, ogImage = '/og-image.png', noindex = false, } = Astro.props; const canonicalUrl = canonical ?? new URL(Astro.url.pathname, SITE).toString(); const fullOgImage = ogImage.startsWith('http') ? ogImage : `${SITE}${ogImage}`; const umamiId = process.env.UMAMI_WEBSITE_ID; const umamiSrc = process.env.UMAMI_SRC ?? 'https://analytics.nocleus.com/script.js'; const path = Astro.url.pathname; const isActive = (p: string) => (p === '/' ? path === '/' : path.startsWith(p)); const jsonLd = { '@context': 'https://schema.org', '@graph': [ { '@type': 'WebSite', '@id': `${SITE}/#website`, name: 'Info Canicule', url: SITE, description, inLanguage: 'fr-FR', publisher: { '@type': 'Person', name: 'Florian Bouchet' }, potentialAction: { '@type': 'SearchAction', target: `${SITE}/departement/{code}`, 'query-input': 'required name=code', }, }, { '@type': 'Service', '@id': `${SITE}/#service`, name: 'Info Canicule', serviceType: "Service d'information météorologique grand public", areaServed: { '@type': 'Country', name: 'France' }, audience: { '@type': 'PeopleAudience', audienceType: 'Grand public, personnes fragiles' }, provider: { '@type': 'Person', name: 'Florian Bouchet', url: `${SITE}/a-propos`, }, isBasedOn: { '@type': 'Dataset', name: 'Vigilance Météo France', url: 'https://vigilance.meteofrance.fr/', creator: { '@type': 'Organization', name: 'Météo-France' }, license: 'https://www.etalab.gouv.fr/licence-ouverte-open-licence/', }, isAccessibleForFree: true, }, ], }; --- {noindex ? : } {title} {umamiId && ( )}