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

How to generate a page only in one language #140

Open
wirths opened this issue Aug 24, 2020 · 2 comments
Open

How to generate a page only in one language #140

wirths opened this issue Aug 24, 2020 · 2 comments

Comments

@wirths
Copy link

wirths commented Aug 24, 2020

Hi,
in general, we have a version in each language for most pages, but for some articles we want to keep only a version in one language.
What is the best practice for achieving this?
Thanks,
Harald

@samajammin
Copy link
Contributor

@wirths we hit the same issue. This is how I solved it in our project: https://github.com/ethereum/ethereum-org-website/blob/dev/gatsby-node.js#L183

Basically we use the gatsby-node.js onCreatePage hook to check if we support the page in each language. If not, we delete the page.

Hope that's helpful! Would appreciate thoughts/feedback if there's an easier way.

@lucascaro
Copy link

related idea and proof of concept: #152

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

No branches or pull requests

3 participants