Open ToonFroeyenDEV opened 3 years ago
Same here:
package.json
"dependencies": {
...
"@nuxtjs/sitemap": "^2.4.0",
...
nuxt.config.js
hooks: {
sitemap: {
generate: {
before(nuxt, sitemapOptions) {
console.log('This wont fire.')
},
done(nuxt) {
console.log('This neither')
}
}
}
},
Rest works fine and as intended. What am I missing?
Using dynamic routes with multiple locales is not possible unless you use static locales (https://github.com/nuxt-community/sitemap-module/issues/122). We are trying to fix this by using the hooks sitemap:generate:done or sitemap:generate:before as stated on (https://sitemap.nuxtjs.org/usage/hooks) But these aren't firing either.
generator.js
export default function (_) { this.nuxt.hook('sitemap:generate:done', (nuxt) => { console.log('Fire sitemap generate hook') }) }
nuxt.extend.js
buildModules: ['modules/project-extend', 'modules/sitemapRouteGenerator'],