Open alextse opened 1 month ago
@alextse Can you clarify which example you're referring to (e.g., screenshot)?
Hi @samcx , below is the sample I've tried.
import type { MetadataRoute } from 'next'
export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: 'https://acme.com',
lastModified: new Date(),
changeFrequency: 'yearly',
priority: 1,
},
{
url: 'https://acme.com/about',
lastModified: new Date(),
changeFrequency: 'monthly',
priority: 0.8,
},
{
url: 'https://acme.com/blog',
lastModified: new Date(),
changeFrequency: 'weekly',
priority: 0.5,
},
]
}
and here's my next.js config.
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export'
};
export default nextConfig;
@alextse Thanks for the clarification! Taking a look
Can also confirm the issue
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
What is the documentation issue?
Using the provided example, getting the following error with a SSG setup.
Is there any context that might help us understand?
Next.js version: 14.2.13
Is generating sitemap.xml even possible with SSG?
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap