-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add option to disable page creation for each language #9
Comments
Hi, thanks for the contribution, I will appreciate a PR, but I think your approach is all or nothing. Maybe we can add another option to specify a regex to enable this feature only for some paths. Imagine the use case where you have a landing page that you want to automatically translate to all available languages, but you also have a blog section that fetches posts from some CRM. I think it would be handy to allow a user to specify
|
See [this thread](microapps#9 (comment)).
Good point, in the latest commit I changed |
I notice there is also a problem with |
@jenkin this should be solved in the latest release. Check new pages option. |
I know that "support multi-language url routes in a single page component" is the main feature of this plugin, but if content and paths are managed by an external system (ie. wordpress with wpgraphql and polylang) that feature becomes a problem. For example, if wpgraphql returns a page with original path
/en/page-1
, gatsby creates multiple pages with/en/en/page-1
,/it/en/page-1
, and so on.I made a little change to make optional the creation of localized paths (
localizedPaths
option), without change the default behavior. In this case, language is extracted from original path with a custom function (languageFromPath
option). You can see it here.Of course, if you want, I can send you a PR.
The text was updated successfully, but these errors were encountered: