diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-04 10:56:21 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-04 10:56:21 +0700 |
| commit | 64a60cc9c6a836cc574036bd4998f16ea945f3c2 (patch) | |
| tree | bc6bb3c152e1096d4c8e2e24406363c26ad78867 /src/pages/sitemap | |
| parent | adf52ef6588def76e184ea04b6c6024d71b927c9 (diff) | |
fix product sitemap
Diffstat (limited to 'src/pages/sitemap')
| -rw-r--r-- | src/pages/sitemap/products.xml.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pages/sitemap/products.xml.js b/src/pages/sitemap/products.xml.js index e5fc8029..a2067308 100644 --- a/src/pages/sitemap/products.xml.js +++ b/src/pages/sitemap/products.xml.js @@ -9,7 +9,10 @@ export async function getServerSideProps({ res }) { const products = await productSearchApi({ query: _.toQuery(query) }) const pageCount = Math.ceil(products.response.numFound / limit) const pages = Array.from({ length: pageCount }, (_, i) => i + 1) - const sitemapIndex = create('sitemapindex', { encoding: 'UTF-8' }) + const sitemapIndex = create('sitemapindex', { encoding: 'UTF-8' }).att( + 'xmlns', + 'http://www.sitemaps.org/schemas/sitemap/0.9' + ) const date = new Date() pages.forEach((page) => { |
