Hi!
The above is my url.
A dynamic sitemap is being generated in the build of my Nuxt3 project. It is reflected as being made in the deploy logs. But it is not there… i get 404’s and also if I download the deploy folder I can see it’s gone.
Build settings:
Runtime
Not set
Base directory
Not set
Build command
npx nuxi generate
Publish directory
dist
Build status
Active
deploy logs:
1:08:22 PM: ‘/packages/100077/kruger-park-lodge’,
1:08:22 PM: … 160 more items ]
1:08:22 PM: [success] Generated /.output/public/sitemap.xml
1:08:22 PM: [success] You can now deploy dist to any static hosting!
Hi @sharkfin009, thanks for the post and welcome to the Netlify Support Forums.
If you have not yet visited the Official Nuxt.js link below on how to install and configure sitemaps, kindly do so to see if it works.
Setup
Configuration
Usage
If you are having a hard time figuring out what to do or the above does not work also kindly follow the suggestions in the post below.
It’s a new module for nuxt 3 and is working perfectly in my dev environment. And the deploy logs state that the xml is being generated. I have also tried simply placing an xml in the root of my repo and that does end up in my deploy. But I need a new sitemap to be generated with lots of dynamic routes every time there’s a build.
One can only infer that the sitemap is not actually being put in the folder for some reason? Not disappearing as my post says
To be clear , i have a script (called by the nuxt config) which is querying the backend for all the current travel package data and building urls for the sitemap. This is happening , one can see in the logs
Hi @sharkfin009, you are welcome.
If you get a response from the GitHub issues page and it helps solve your problem, kindly share the solution here in order to help others experiencing the same issues in the future.
Okay so the build settings you stated is called at build time.
Since you are using the command npx nuxi generate the quote below is from the Nuxt.js documentation website.
The nuxi generate command pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services.
Therefore to my knowledge once the above is complete the HTML files are copied to the publish directory called dist and then deployed.
Does the script you stated above called at runtime or at build time?
Hi @sharkfin009, if you want your builds to run daily, kindly check the Netlify blog link below on how to schedule deploys to see if it helps solve your use case.