Skip to content

Commit

Permalink
Fix typo in generate-sitemaps.mdx docs
Browse files Browse the repository at this point in the history
the `id` was for the sitemap page (file).

But in the list of products for this sitemap file, we should use something like `product.id` (in a similar way to using `product.date` for lastModified
  • Loading branch information
247c authored Dec 27, 2023
1 parent fc25fce commit a1f60c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default async function sitemap({
`SELECT id, date FROM products WHERE id BETWEEN ${start} AND ${end}`
)
return products.map((product) => ({
url: `${BASE_URL}/product/${id}`
url: `${BASE_URL}/product/${product.id}`
lastModified: product.date,
}))
}
Expand Down

0 comments on commit a1f60c9

Please sign in to comment.