From eb3c869c880fc1ade74a57cbe7de4f3ae8ece996 Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Wed, 16 Oct 2024 15:07:37 -0700 Subject: [PATCH] chore(hotfix) (#581) * chore: trigger build * 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);