-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <inbox@huozhi.im> Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
- Loading branch information
1 parent
b931a83
commit 93ad2f2
Showing
7 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
test/e2e/app-dir/metadata-dynamic-routes/app/sitemap-image/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
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', | ||
], | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters