themes icon indicating copy to clipboard operation
themes copied to clipboard

[gatsby-theme-i18n] limit generation of localised pages to a subset of pages only

Open olivier-lacroix opened this issue 3 years ago • 1 comments

Hello,

For some locales, I want to generate a localised page for only some pages. gatsby-theme-i18n currently does not allow that.

I imagine that:

  • this could be parametrised by an array of RegExp whitelisting pages to localise in the config file;
  • localizedPath would fallback to default locale when requesting a page that is not available in a given locale

Is this a feature you would consider including in gatsby-theme-i18n?

olivier-lacroix avatar May 27 '21 11:05 olivier-lacroix

I gave it a go in PR https://github.com/gatsbyjs/themes/pull/133

olivier-lacroix avatar May 31 '21 11:05 olivier-lacroix