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 includes homepage with trailing slash even when trailingSlash set to never #37536

Closed
2 tasks done
hitfactory opened this issue Jan 26, 2023 · 2 comments
Closed
2 tasks done
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@hitfactory
Copy link

Preliminary Checks

Description

Even when setting trailingSlash to never and siteUrl to the homepage URL without a trailing slash, the homepage URL in sitemap generated by gatsby-plugin-sitemap includes a trailing slash.

Reproduction Link

https://github.com/hitfactory/gatsby-starter-blog

Steps to Reproduce

  1. gatsby new blog https://github.com/gatsbyjs/gatsby-starter-blog
  2. npm install gatsby-plugin-sitemap
  3. Set trailingSlash to never in gatsby-config.js and siteUrl to https://gatsbystarterblogsource.gatsbyjs.io
  4. Add gatsby-plugin-sitemap to plugins array in gatsby-config.js
  5. gatsby build
  6. gatsby serve
  7. View https://gatsbystarterblogsource.gatsbyjs.io/sitemap-0.xml

Expected Result

sitemap.xml includes siteUrl as configured i.e. without trailing slash

Actual Result

sitemap-0.xml includes homepage with trailing slash

Environment

System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox: 103.0.2
    Safari: 16.2
  npmPackages:
    gatsby: ^5.5.0 => 5.5.0 
    gatsby-plugin-feed: ^5.5.0 => 5.5.0 
    gatsby-plugin-image: ^3.5.0 => 3.5.0 
    gatsby-plugin-manifest: ^5.5.0 => 5.5.0 
    gatsby-plugin-sharp: ^5.5.0 => 5.5.0 
    gatsby-plugin-sitemap: ^6.5.0 => 6.5.0 
    gatsby-remark-images: ^7.5.0 => 7.5.0 
    gatsby-remark-prismjs: ^7.5.0 => 7.5.0 
    gatsby-remark-responsive-iframe: ^6.5.0 => 6.5.0 
    gatsby-source-filesystem: ^5.5.0 => 5.5.0 
    gatsby-transformer-remark: ^6.5.0 => 6.5.0 
    gatsby-transformer-sharp: ^5.5.0 => 5.5.0

Config Flags

No response

@hitfactory hitfactory added the type: bug An issue or pull request relating to a bug in Gatsby label Jan 26, 2023
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 26, 2023
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 27, 2023
@LekoArts
Copy link
Contributor

Please see #34205 (reply in thread)

@LekoArts LekoArts closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2023
@mikolasan
Copy link

The answer is basically: "it's fine like that, don't worry"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants