Create a sitemap for your Gatsby site.
npm install --save gatsby-plugin-sitemap
// In your gatsby-config.js
siteMetadata: {
siteUrl: `https://www.example.com`,
},
plugins: [
{
resolve: `gatsby-plugin-sitemap`
}
]
Above is the minmal configuration required to have it work, however, note that
the default
query
only retrieves nodes of type MarkdownRemark
. Any parameter in
defaultOptions
can be overridden.