I desperately need to NOT generate any trailing slashes for Gatsby pages.
I'm currently using gatsby-plugin-remove-trailing-slashes but the plugin seems to give me more problems than it solves:
Anyone could tell me how to force Gatsby to NOT generate any trailing slashes while generating pages?
Thanks
I've found one way to prevent this from happening is to use createPage with a .html extension. This prevents Gatsby from making a folder with an index.html for that page when doing gatsby build. https://www.gatsbyjs.org/docs/actions/#createPage
// Creates /public/my-sweet-new-page/index.html
createPage({ path: '/my-sweet-new-page/' })
// Creates /public/my-sweet-new-page.html
createPage({ path: '/my-sweet-new-page.html' })
(Disclaimer: I'm still investigating this too! There might be better ways than this.)
Nice workaround, however, trailing .html is something I want to avoid also. Any other ideas?
There's a discussion about this issue going on here: https://github.com/gatsbyjs/gatsby/issues/9207
For my side, I stopped trying to solve it within Gatsby, we handle it on Lambda@Edge instead. If that's something you can do, you can see my comment in the above issue https://github.com/gatsbyjs/gatsby/issues/9207#issuecomment-479359403
Hey again!
It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.
Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community!
Most helpful comment
There's a discussion about this issue going on here: https://github.com/gatsbyjs/gatsby/issues/9207
For my side, I stopped trying to solve it within Gatsby, we handle it on Lambda@Edge instead. If that's something you can do, you can see my comment in the above issue https://github.com/gatsbyjs/gatsby/issues/9207#issuecomment-479359403