From 9882cab702b4390f0c1014363dfb6f9ac70421b8 Mon Sep 17 00:00:00 2001 From: Florian Lefebvre Date: Tue, 30 Apr 2024 12:52:49 +0200 Subject: [PATCH] fix: exclude non pages from sitemap --- .changeset/breezy-games-attack.md | 5 +++++ package/src/sitemap/integration.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/breezy-games-attack.md diff --git a/.changeset/breezy-games-attack.md b/.changeset/breezy-games-attack.md new file mode 100644 index 0000000..d68e059 --- /dev/null +++ b/.changeset/breezy-games-attack.md @@ -0,0 +1,5 @@ +--- +"@astrolicious/i18n": patch +--- + +Fixes a case where non pages were included in the sitemap diff --git a/package/src/sitemap/integration.ts b/package/src/sitemap/integration.ts index 23419e6..96f34b2 100644 --- a/package/src/sitemap/integration.ts +++ b/package/src/sitemap/integration.ts @@ -150,7 +150,7 @@ export const integration = defineIntegration({ ); } r.routeData = routeData; - r.include = true; + r.include = routeData.type === "page"; } const _routes = [