Replies: 6 comments 2 replies
-
@alextse Can you clarify which example you're referring to (e.g., screenshot)? |
Beta Was this translation helpful? Give feedback.
-
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; |
Beta Was this translation helpful? Give feedback.
-
@alextse Thanks for the clarification! Taking a look |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
@alextse This is the error I get when I try to build locally →
If you add the Route Segment Config, you are able to successfully build with |
Beta Was this translation helpful? Give feedback.
-
@alextse were you able to find a solution? I am facing the same issue but in next 15 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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
Beta Was this translation helpful? Give feedback.
All reactions