-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Just getting to grips with the Beta i18n capabilities and really like the multple_folders
and multiple_files
structures. However, I am confused by the decision to only support a single_file
structure for file collections. I say this reservedly as, clearly, a lot of work must have gone into providing the i18n capabilities and therefore this is in no way a critisism and, quite possibly, may be down to a misunderstanding on my part. The problem that I have though is generating pages in gatsby-node when the i18n implementation involves a mixed structure of multiple_files
(i.e. for templated content such as blog posts, product entries etc.) and single_file
for one off pages (i.e. index, about, contact).
I'd like to see file collections also support a multiple_files
structure as that would allow a single createPage
mechanism in gatsby-node to be used. Naturally, that would require a single markdown file for language-specific page, using locale as the differentiating factor i.e. index.en.md, index.de.md, index.es.md and so on.
If this isn't technically viable, please advise how to go about page generation in gatsby-node when confronted with both multiple_files
and single_file
collections.
Thanks in advance for your help!