I'm using gatsby-plugin-advanced-sitemap to create the sitemap for my website, but there aren't any trailing slashes. The only option I specify is the exclude array, which works perfectly.
I'm using Gatsby 4.21 and have specified this in my gatsby-config.js:
module.exports = {
trailingSlash: `always`,
In version 2 of Gatsby, I used the gatsby-plugin-force-trailing-slashes plugin and it worked. In version 4, I removed the plugin. I did reinstall it to test, but it no longer works.
Does anyone know how I can fix this? Thanks in advance!
It seems to be a known issue and the proposal solution is to use gatsby-plugin-sitemap
instead, which is an official plugin and has a drop-in support.
Using trailingSlash: always
along with gatsby-plugin-sitemap
should work.