Setup

Installation

Add @nuxtjs/sitemap dependency to your project:

yarn add @nuxtjs/sitemap
npm install @nuxtjs/sitemap

Setup

Add @nuxtjs/sitemap to the modules section of your nuxt.config.js file:

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

notice:
If you use other modules (eg. nuxt-i18n), always declare the sitemap module at end of array
eg. modules: ['nuxt-i18n', '@nuxtjs/sitemap']