gatsby-plugin-react-i18next
gatsby-plugin-react-i18next copied to clipboard
Pages without any language slug not needed
Hi, I was testing this plugin and I realized that pages are generated not only for the defined languages, but also default pages that don't contain any language slug.
For example, if I create a page named test.js and configure the plugin as it follows:
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/locales`,
name: `locale`
}
},
{
resolve: `gatsby-plugin-react-i18next`,
options: {
localeJsonSourceName: `locale`,
languages: [`it`, `en`],
defaultLanguage: `en`,
generateDefaultLanguagePage: true,
siteUrl: process.env.GATSBY_SITE_URL,
}
},
I get the following pages/uris:
-
/it/test -
/en/test -
/testthat redirects to/en/testand is not desired
Is this behaviour intentional? Am I missing something? In my view of things and following the best practices on the SEO side, it would make sense to generate only the pages containing the required language slugs. Is this something I can achieve through this plugin's settings?
Thanks!