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;
---
-
+