What is the improvement or update you wish to see?
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-localized-sitemap
The localized sitemap example looks like this
import { MetadataRoute } from 'next'
export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: 'https://acme.com',
lastModified: new Date(),
alternates: {
languages: {
es: 'https://acme.com/es',
de: 'https://acme.com/de',
},
},
},
{
url: 'https://acme.com/about',
lastModified: new Date(),
alternates: {
languages: {
es: 'https://acme.com/es/about',
de: 'https://acme.com/de/about',
},
},
},
{
url: 'https://acme.com/blog',
lastModified: new Date(),
alternates: {
languages: {
es: 'https://acme.com/es/blog',
de: 'https://acme.com/de/blog',
},
},
},
]
}
If I copy paste that example, it doesn't work.
Object literal may only specify known properties, and 'alternates' does not exist in type '{ url: string; lastModified?: string | Date | undefined; changeFrequency?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never" | undefined; priority?: number | undefined; }'

Also, when selecting "javascript" instead of "typescript", the example disapears.

Is there any context that might help us understand?
I literally copy pasted the example from the docs.
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-localized-sitemap
What is the improvement or update you wish to see?
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-localized-sitemap
The localized sitemap example looks like this
If I copy paste that example, it doesn't work.
Also, when selecting "javascript" instead of "typescript", the example disapears.
Is there any context that might help us understand?
I literally copy pasted the example from the docs.
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-localized-sitemap