diff --git a/examples/sitemap/app/lib/sitemap.ts b/examples/sitemap/app/lib/sitemap.ts index cb868e3e0f..1c8bfbc08a 100644 --- a/examples/sitemap/app/lib/sitemap.ts +++ b/examples/sitemap/app/lib/sitemap.ts @@ -4,6 +4,10 @@ import { LanguageCode, } from '@shopify/hydrogen/storefront-api-types'; +const SITEMAP_INDEX_PREFIX = ` +`; +const SITEMAP_INDEX_SUFFIX = ``; + const SITEMAP_PREFIX = ` `; const SITEMAP_SUFFIX = ``; @@ -43,7 +47,7 @@ export async function getSitemapIndex({ const baseUrl = new URL(request.url).origin; const body = - SITEMAP_PREFIX + + SITEMAP_INDEX_PREFIX + types .map((type) => getSiteMapLinks(type, data[type].pagesCount.count, baseUrl), @@ -52,7 +56,7 @@ export async function getSitemapIndex({ customUrls .map((url) => '' + url + '') .join('\n') + - SITEMAP_SUFFIX; + SITEMAP_INDEX_SUFFIX; return new Response(body, { headers: {