@nuxt/sitemap not supported?
See original GitHub issueHi! I’m using nuxt-generate-cluster to generate my static site (nuxt-generate -b
).
Latest version of Nuxt, latest everything.
At the end of my generation, under normal circumstances (i.e. nuxt generate
), my sitemap gets generated. Great!
However, with nuxt-generate-cluster, this doesn’t seem to happen. Is there any way I can manually generate the sitemap, or add a hook the end of this other generate function?
nuxt.config.js:
...
modules: [
'nuxt-i18n',
'@nuxtjs/feed',
'@nuxtjs/sitemap',
],
...
generate: {
dir: './docs',
fallback: '404.html',
workers: 4,
workerConcurrency: 20,
concurrency: 20,
routes: () => {...}
},
...
<div align="right">This question is available on Nuxt community (#c11)</div>Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
sitemap.xml not generating · Issue #18 · nuxt ... - GitHub
The sitemap is not running when I run the build command. Below is the configuration for modules and sitemap. I am importing axios...
Read more >nuxt sitemap not working properly when used with nuxt-i18n
When setup the config for nuxt-i18n in nuxt sitemap config the sitemap is not rendering properly. sitemap: { hostname: 'http://localhost:8080', ...
Read more >Sitemap options - Nuxt Sitemap Module
Routes Declaration By default, the dynamic routes are ignored by the sitemap module. Nuxt cannot automatically provide this type of complex routes. If...
Read more >@nuxtjs/sitemap NPM | npm.io
Routes Declaration. By default, the dynamic routes are ignored by the sitemap module. Nuxt cannot automatically provide this type of complex routes. Example:...
Read more >Working With Sitemaps in Nuxt.js - DEV Community
Zip or not, it is up to you to decide. Simple Single Sitemap With Routes. So, usually if you have your own portfolio...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nuxt/sitemap
creates the sitemap in thegenerate:done
hook. This is incompatible with nuxt-generate-cluster as the generate:done hook will be called for every batch that a worker completes. Also the route cache will be empty as the cache is filled on the master and the generate:done hook is called on the workers.Untested, but ncg has a done hook you could maybe use to manually call the generate:done hook on the master.
Unfortunately this doesnt receive the nuxt instance, so you need to get that from a nuxt hook:Sincev.2.7.0
the Nuxt instance is passed as second arg to the done method:Its a bit hacky but it might just work 😉
@sebbean pro tip: build locally, then use Netlify CLI to push your code; that way you don’t need to bypass the build minutes.