Describe the bug
When trailingSlashes is set to false, but siteUrl is set to "yourdomain.com/", next-sitemap will automatically remove the trailing slash (see additional context on why I'm doing this).
To Reproduce
Steps to reproduce the behavior:
Go to 'next.config.js' and set trailingSlashes to false (or leave it out for the default setting, which is false)
Go to 'next-sitemap.config.js' and set siteUrl to yourdomain.com/ (with a trailing slash)
Run the next-sitemap command
Check sitemap-0.xml. It now has removed the trailing slash from the domain you provided
Expected behavior
I would expect the siteUrl property to be dominant here, since this is manually added. All other URLs should still be generated without a trailing slash.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Admittedly, a bit of a weird configuration, but I don't see any alternatives to keep SEO tools satisfied. All relative URLs to the homepage go to "/", meaning they direct to your domain with a trailing slash. SEO tools don't really like it when there are no incoming URLs to your canonical page, thus if you make the canonical page "yourdomain.com" and direct all homepage links to "/" (and thus yourdomain.com/), the SEO tools will throw an error. To solve this, you can make the homepage canonical version "yourdomain.com/", even though the page will still be redirected to "yourdomain.com", which does keep the tools satisfied. All other pages can just be non trailing. I don't know if this is "the way to go", so if anyone has any suggestions please drop them down below :)
Describe the bug When trailingSlashes is set to false, but siteUrl is set to "yourdomain.com/", next-sitemap will automatically remove the trailing slash (see additional context on why I'm doing this).
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect the siteUrl property to be dominant here, since this is manually added. All other URLs should still be generated without a trailing slash.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Admittedly, a bit of a weird configuration, but I don't see any alternatives to keep SEO tools satisfied. All relative URLs to the homepage go to "/", meaning they direct to your domain with a trailing slash. SEO tools don't really like it when there are no incoming URLs to your canonical page, thus if you make the canonical page "yourdomain.com" and direct all homepage links to "/" (and thus yourdomain.com/), the SEO tools will throw an error. To solve this, you can make the homepage canonical version "yourdomain.com/", even though the page will still be redirected to "yourdomain.com", which does keep the tools satisfied. All other pages can just be non trailing. I don't know if this is "the way to go", so if anyone has any suggestions please drop them down below :)