Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemap renders .vue & .js files, how can i exclude those .js ? #245

Open
YsarocK opened this issue Apr 8, 2022 · 1 comment
Open

Sitemap renders .vue & .js files, how can i exclude those .js ? #245

YsarocK opened this issue Apr 8, 2022 · 1 comment

Comments

@YsarocK
Copy link

YsarocK commented Apr 8, 2022

Hello !

I'm trying to use the sitemap module (which is, except this, quite usefull).
My pages folders are like this : /pages/reservation/index.vue with external .js & .scss files.

In the sitemap, i have both /reservation & /reservation/reservation created routes.

I've tried to exclude "*/**.js" in nuxt.config.js.

Am i missing something ?

Thanks for your help !

@urbgimtam
Copy link

In sitemap options inside nuxt.config.js, you can exclude with the following syntax:

sitemap: {
  exclude: [
    '/**/*.js',        // this should work
    '/reservation/**/*.js',    //  this should also work
    '/secret', 
    '/admin/**', 
    '/graphql/**', 
  ],
  defaults: {
    // ...
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants