Exclude pages from netlifys sitemap plugin

I included the netlify sitemap plugin in my nuxt.js site. However I kept getting excluded pages still showing up! Hopefully this saves you some time if it's happening to you as well.

You need to remember nuxt is generating static HTML files, so even though the route is /contact/success the page to exclude (since it's looking at files) is /contact/success.html

Here's an example of a working nuxt.js netlify.toml with working excludes.

Note the netlifycms admin route is NOT an html file, do not add it to there.

[build]
  publish = "dist"
  command = "yarn generate"
  functions = "app/functions"

[[plugins]]
  package = "@netlify/plugin-sitemap"

  [plugins.inputs]
    exclude = [
      '**/admin',
      '**/200.html',
      '**/about.html',
      '**/contact/success.html',
    ]
Ready to Start?

Let's Build Something Amazing Together

Ready to bring your vision to life? We specialize in creating stunning websites, mobile apps, and digital experiences that make an impact.

Accepting new clients
Free consultation
15+ years experience