--- import { SITE } from '../consts'; import { baseGraph } from '../seo'; interface Props { title?: string; description?: string; image?: string; type?: 'website' | 'article'; publishedTime?: string; modifiedTime?: string; tags?: string[]; jsonLd?: unknown[]; // Tynde oversigtssider (fx tags med 1-2 indlæg) skal ikke i Googles indeks, // men links fra dem skal stadig følges. noindex?: boolean; } const { title, description, image, type = 'website', publishedTime, modifiedTime, tags = [], jsonLd = [], noindex = false, } = Astro.props; const pageTitle = title ? `${title} · ${SITE.name}` : `${SITE.title} · Datalog & Technical Solution Architect`; const desc = description ?? SITE.description; // Kanonisk form er UDEN afsluttende skråstreg. Origin serverer begge former med // 200, og de interne links peger alle på no-slash, så canonical og sitemap skal // gøre det samme, ellers opdager Google to adskilte sæt af de samme sider. const canonicalPath = Astro.url.pathname.replace(/\/$/, '') || '/'; const canonical = new URL(canonicalPath, SITE.url).href; const ogImage = new URL(image ?? '/og.png', SITE.url).href; const graphs = [baseGraph, ...jsonLd]; ---