nuxt-community / sitemap-module

Sitemap Module for Nuxt 2
https://sitemap.nuxtjs.org
MIT License
690 stars 128 forks source link

Support @nuxtjs/router module. #181

Closed alanaasmaa closed 3 years ago

alanaasmaa commented 3 years ago

What problem does this feature solve?

Hi,

I'm using https://github.com/nuxt-community/router-module module and I add some custom routes inside router.js file. But because sitemap uses nuxt extendroutes() feature those custom routes font come into sitemap. I also can't add these manually because they are dynamic and based on static nuxt pages.

I add routes like this in loop => // if example-x-page does not exists create it

router.addRoutes([{
  name: `example-${pageNumber}-page`,
  path: `/example-${pageNumber}-page`,
  component: examplePage
}])

What does the proposed changes look like?

Support @nuxtjs/router module or enable to access generated .nuxt/routes.js file in routes() function.

This feature request is available on Nuxt community (#c129)
alanaasmaa commented 3 years ago

Duplicate of https://github.com/nuxt-community/sitemap-module/issues/98

Didn't notice it first.