Nextjs 13 Sitemaps
Unanswered
Least Auklet posted this in #help-forum
Least AukletOP
I'm trying to get sitemaps working with latest Nextjs 13? Been trying for a couple of days now and the errors I get simply says that the package just doesn't exist https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap
Tried:
npm run build with the simple example in the docs but no sitemap gets generated.
My sitemap.js is in the app folder
Google gives me nothing so I don't know whether this is suppose to be super simple or if I'm missing some kind of config, at a loss.
Tried:
npm run build with the simple example in the docs but no sitemap gets generated.
My sitemap.js is in the app folder
Google gives me nothing so I don't know whether this is suppose to be super simple or if I'm missing some kind of config, at a loss.
6 Replies
Least AukletOP
Just to add this this, when I build this is my output:
Route (app) Size First Load JS
┌ ○ / 1.13 kB 98.8 kB
├ ○ /_not-found 883 B 81.3 kB
├ λ /area/[slug] 1.13 kB 98.8 kB
â”” â—‹ /sitemap.xml 0 B 0 B
Route (app) Size First Load JS
┌ ○ / 1.13 kB 98.8 kB
├ ○ /_not-found 883 B 81.3 kB
├ λ /area/[slug] 1.13 kB 98.8 kB
â”” â—‹ /sitemap.xml 0 B 0 B
what do you mean by "not generated"... also iirc static files (not pages) show up as 0 size on build menu... so, when you start it, does the file exist?
Least AukletOP
the sitemap xml file doesn't get generated
when you build
@Least Auklet the sitemap xml file doesn't get generated
so, when you start the website, and you go to
/sitemap.xml it is a 404? or empty page?Least AukletOP
no file there at all, doesn't create the file