Excluding files from the generate command #78
Replies: 1 comment 1 reply
-
Hey @morpheus7CS, thank you for the question!
I'm afraid there isn't. Though, this is an interesting use case! I'll try taking a step back and hopefully explain my train of thought. Let's say an article is written in english (the default language) and there is no localization in another language (eg. french). What would be the best UX for a person navigating in the french website?
A few issues to take into consideration for each option:
I think the first and second options are not good and they would push towards bad practices in terms of UX (404, redirects, giving users no choice and risk losing them). Ultimately, I think that the best option is the third one, remains the issue with the confusion though. The solution would be to add a banner on top of the article stating that the article is not translated in french. Also, technically, the non translated article would need to be wrapped in an html tag with the The third option can be implemented today as you'd have to keep the generated pages as is. I've done that myself with a website I manage (https://castopod.org) on the french legal notice page. Though, because it's not as critical as blog articles, I haven't added the banner to prevent users from being confused, nor the This brings new questions I haven't thought of previously:
Hopefully I answered your question! Note that maybe there are things I'm missing and I'm open to any suggestion 🙂 |
Beta Was this translation helpful? Give feedback.
-
Hi @yassinedoghri,
I wonder if there is an option to exclude certain pages from being built in other languages.
Let's say I have a personal website. Here are the imaginary routes for the default locale:
/
/blog/
/blog/<slug>/
/about/
Now, I would like to have the same structure in a different language, but without:
/blog/
/blog/<slug>/
Is there a way to specify the routes that I want to skip in generating the i18n pages?
The dirty solution is of course to generate everything and manually remove what you don't need, but I'm wondering if there is a better way around it.
Thanks,
g
Beta Was this translation helpful? Give feedback.
All reactions