Files
93ad2f22e9 Sitemap image tag support (#68034)
Image Tag should be available in sitemap.xml, which is not currently
support in sitemap.

In this pr, I solved issue #68033  which I faced in my project.

cc  @leerob @delbaoliveira  @samcx 

x-ref:
https://developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps

---------

Co-authored-by: Jiachi Liu <[email protected]>
Co-authored-by: Delba de Oliveira <[email protected]>
2024-08-07 11:48:26 +02:00

21 lines
444 B
TypeScript

import { MetadataRoute } from 'next'
export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: 'https://example.com',
lastModified: '2024-01-01',
changeFrequency: 'daily',
priority: 0.5,
},
{
url: 'https://example.com/about',
lastModified: '2024-01-01',
images: [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg',
],
},
]
}