microapps / gatsby-plugin-react-i18next

Easily translate your Gatsby website into multiple languages
MIT License
121 stars 72 forks source link

Respect Gatsby's `trailingSlash` option #127

Closed bicstone closed 1 year ago

bicstone commented 2 years ago

trailingSlash option has been added by gatsby.

https://www.gatsbyjs.com/docs/reference/config-files/gatsby-config/#trailingslash https://github.com/gatsbyjs/gatsby/discussions/34205

The current behavior is always add trailing slashes to each URL regardless of the trailingSlash option.

https://github.com/microapps/gatsby-plugin-react-i18next/blob/10d2a08861248daeec6c6589d7d89c16a506fdab/src/Helmet.tsx#L7-L10

Is it possible to be able to respect Gatsby's trailingSlash option and control the handling of trailing slashes?

sklawren commented 2 years ago

https://github.com/microapps/gatsby-plugin-react-i18next/pull/136

You'll have to add trailingSlash yourself to this plugin's options to match what you set it to in the gatsby config, but it will work.

bicstone commented 1 year ago

@sklawren Thanks!