Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot build gatsby sitemap #199
Describe the bug
Desktop (please complete the following information):
I was able to solve this issue in my local installation but figured it makes sense to share it here as a bug.
Proposed solution (worked for me)
Then go to plugin config for gatsby-plugin-sitemap and change siteMetadata read to siteUrl instead of url. Also in the serialize part, make it read site.siteMetadata.siteUrl instead of site.siteMetadata.url.
@ngl4 I may have seen something in the rss plugin that utilizes url as well. Also, the point of a config is to have it in one place which is generally not bad. What
If it works for you, its fine, just want to mention that you split now the places you actually edit your config. Ideally you want all data to be configured in just one file.
Hi, thanks for the hint, it helped me to get rid of one issue and understand more about configs in gatsby. But now when building I get the error "Plugin gatsby-plugin-sitemap returned an error
@jjosseff I ran into the same issue. Debugging the sitemap node module itself, showed me that this happens also when the variable siteUrl is undefined.
Check the graphql query and the stream of data. Most likely it is a typo or something missing.
In my case, I forgot about the part below the graphql query. In the serialize you also have to change url to use siteUrl.