Skip to content

Commit

Permalink
chore(hotfix) (#581)
Browse files Browse the repository at this point in the history
* chore: trigger build

* fix: do not encode URI slashes
  • Loading branch information
alexgoff authored Oct 16, 2024
1 parent 3f36ea2 commit eb3c869
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/api/sitemap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb3c869

Please sign in to comment.