From 4936c29b20c9ee1a50dce60764dc0344a6a5f7fb Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Thu, 3 Oct 2024 11:28:58 -0700 Subject: [PATCH 1/2] chore: trigger build From 755a194fdca52d15a27977d3d530d2c5b5eb049f Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Wed, 16 Oct 2024 14:43:46 -0700 Subject: [PATCH 2/2] fix: do not encode URI slashes --- lib/api/sitemap/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/api/sitemap/index.ts b/lib/api/sitemap/index.ts index 2760be22..37d2a59e 100644 --- a/lib/api/sitemap/index.ts +++ b/lib/api/sitemap/index.ts @@ -16,7 +16,8 @@ export const generateSitemapUrl = ( locale: string, preserveLocale = false ) => { - const segments = uri === CRAFT_HOMEPAGE_URI ? [] : [encodeURIComponent(uri)]; + const segments = + uri === CRAFT_HOMEPAGE_URI ? [] : uri.split("/").map(encodeURIComponent); if (preserveLocale || locale !== fallbackLng) { segments.unshift(locale);