diff --git a/astro.config.mjs b/astro.config.mjs index 629a00c..716ad0a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -140,6 +140,12 @@ export default defineConfig({ sitemap({ changefreq: 'weekly', priority: 0.7, + // Tag-siderne er noindex (tynde lister), så de hører heller ikke i sitemap'et. + // /peppol er kun en omdirigering til /nemhandel og skal ikke indekseres. + filter: (page) => { + const p = new URL(page).pathname; + return !p.startsWith('/tags') && !p.startsWith('/peppol'); + }, serialize(item) { const pathname = new URL(item.url).pathname; if (pathname === '/') item.priority = 1.0; diff --git a/src/components/Head.astro b/src/components/Head.astro index 48285b9..1df2d23 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -11,10 +11,13 @@ interface Props { 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 = [], + publishedTime, modifiedTime, tags = [], jsonLd = [], noindex = false, } = Astro.props; const pageTitle = title ? `${title} · ${SITE.name}` : `${SITE.title} · Datalog & Technical Solution Architect`; @@ -33,7 +36,7 @@ const graphs = [baseGraph, ...jsonLd]; - + diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 1d72be3..0b82aed 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -16,8 +16,9 @@ interface Props { modifiedTime?: string; tags?: string[]; jsonLd?: unknown[]; + noindex?: boolean; } -const { title, description, image, type, publishedTime, modifiedTime, tags, jsonLd } = Astro.props; +const { title, description, image, type, publishedTime, modifiedTime, tags, jsonLd, noindex } = Astro.props; --- - + diff --git a/src/pages/index.astro b/src/pages/index.astro index 75f0aad..3e4cc60 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -88,6 +88,8 @@ const jsonLd = [profilePage, faqPage(faqs)]; { href: '/chat', title: 'Spørg mit CV', desc: 'En lille AI der har læst mit CV og svarer på spørgsmål om mig. Prøv den af.' }, { href: '/status', title: 'Homelab-status', desc: 'Live driftsstatus for de offentlige dele af mit homelab. Self-hosted, selvfølgelig.' }, { href: '/now', title: 'Now', desc: 'Hvad jeg roder med lige nu, plus et aktivitets-heatmap fra min egen Gitea.' }, + { href: '/profiler', title: 'Profil-opslag', desc: 'Søgbart opslag over Nemhandel OIOUBL- og Peppol BIS/PINT-profiler: id\'er, dokumenter og typisk brug.' }, + { href: '/ubl', title: 'UBL-tjek', desc: 'Træk en faktura ind og få profil, syntaks og EN 16931-status afkodet. Alt sker i browseren, filen forlader aldrig din maskine.' }, ].map((c) => (

{c.title} →

diff --git a/src/pages/peppol.astro b/src/pages/peppol.astro index d738ad9..ee53da5 100644 --- a/src/pages/peppol.astro +++ b/src/pages/peppol.astro @@ -5,6 +5,7 @@ + NemHandel-opslag diff --git a/src/pages/tags/[tag].astro b/src/pages/tags/[tag].astro index e2ad25e..4f4cce9 100644 --- a/src/pages/tags/[tag].astro +++ b/src/pages/tags/[tag].astro @@ -13,7 +13,7 @@ export async function getStaticPaths() { } const { posts, tag } = Astro.props; --- - +
← Alle tags

#{tag}

diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro index b21c67c..ee86217 100644 --- a/src/pages/tags/index.astro +++ b/src/pages/tags/index.astro @@ -7,7 +7,7 @@ const counts = new Map(); for (const p of posts) for (const t of p.data.tags) counts.set(t, (counts.get(t) ?? 0) + 1); const tags = [...counts.entries()].sort((a, b) => b[1] - a[1]); --- - +

Tags

{tags.map(([t, n]) => (