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

feat: support ignoredPaths and redirectDefaultLanguageToRoot #118

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

theowenyoung
Copy link

@theowenyoung theowenyoung commented May 19, 2020

solve #53

Hi,

I just made a pr for adding ignoredPaths and redirectDefaultLanguageToRoot as an option for intl. Here is explain:

  {
    resolve: `gatsby-plugin-intl`,
    options: {
      // option for use / as defaultLangauge root path. if your defaultLanguage is `ko`, when `redirectDefaultLanguageToRoot` is true, then it will not generate `/ko/xxx` pages, instead of `/xxx`
      redirectDefaultLanguageToRoot: false,
      // paths that you don't want to genereate locale pages, example: ["/dashboard/","/test/**"], string format is from micromatch https://github.com/micromatch/micromatch
      ignoredPaths: [],
    },
  },

Can you review it or any advice?

@renepardon
Copy link

hey @wiziple what's the current status here?

@theowenyoung
Copy link
Author

theowenyoung commented Jul 28, 2020

@renepardon I have published my pr to npm for now, you can use it throughnpm i gatsby-plugin-react-intl before the author merge my update.

The branch is https://github.com/theowenyoung/gatsby-plugin-intl/tree/publish

@renepardon
Copy link

@theowenyoung thank you - I'll give it a try :)

@Marin-Matosevic
Copy link

@theowenyoung Thank you, it works perfectly!

@kenips
Copy link

kenips commented Jan 5, 2021

@wiziple any concerns that you have here? Rather than keeping the fork it's best to stay united. This PR helps with SEO and should really be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants