mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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]>
21 lines
444 B
TypeScript
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',
|
|
],
|
|
},
|
|
]
|
|
}
|