Configuration

Add a custom configuration with the sitemap property:

nuxt.config.js
{
  modules: [
    '@nuxtjs/sitemap'
  ],
  sitemap: {
    // options
  },
}

The module option parameter can be:

Object

A single item of sitemap or sitemap index:

{
  sitemap: {
    // ...
  },
}

Array

A list of sitemap or sitemap index items:

{
  sitemap: [
    {
      // ...
    },
    {
      // ...
    },
  ],
}

Function

A function that returns a valid sitemap configuration:

{
  sitemap: function () {
    return {
      // ...
    }
  },
}

Boolean

You can disable the sitemap module with a boolean value at false:

{
  sitemap: false
}