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.xml not generating #18

crabdul opened this issue Mar 9, 2018 · 4 comments


None yet
3 participants
Copy link

commented Mar 9, 2018

The sitemap is not running when I run the build command.

Below is the configuration for modules and sitemap.
I am importing axios at the start of the nuxt.config.js file

  modules: ['@nuxtjs/sitemap'],
  sitemap: {
    hostname: '',
    routes () {
      return axios.get('')
        .then(res => => {
          const path = '/tracks/' + track.slug
          return path

Axios is getting the data properly because I'm able to print out the slugs of my posts properly


Where am I going wrong?
What else can I check?

This question is available on Nuxt.js community (#c11)

This comment has been minimized.

Copy link

commented Mar 9, 2018

@crabdul, I have tried your use case, it works fine for me!

My steps to reproduce:

// starting from an empty project with Nuxt.js 1.4.0 from starter-template

$ npm install @nuxtjs/sitemap
$ npm install axios

// edit the nuxt.config.json with your configuration,
// add on top `const axios = require('axios')`

$ npm run build
$ npm run start

// open http://localhost:3000/sitemap.xml

This comment has been minimized.

Copy link

commented Mar 11, 2018

Thank you for your help!

I assumed it wasn't generating the sitemap because the sitemap.xml file doesn't appear in .nuxt when I run the build command

@crabdul crabdul closed this Mar 11, 2018

This comment has been minimized.

Copy link

commented Feb 12, 2019 — with CMTY

is it possible to make one sitemap file and in that file, we include 5 sitemaps other files?
Like I want to divide the big sitemap file into smaller 2 or 3 files,
Because my links combination are crossing more than 50 or 60k


This comment has been minimized.

Copy link

commented Feb 12, 2019

@crabdul did you fixed the issue, did you put the modification date and frequency while using the axios request. I am also stuck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.