How’s this feeling? Think it’ll work with what we’re doing now with redwoodjs.com → fr.redwoodjs.com?
It is new territory for me too - I’m not sure how to programatically make the PR once the webhook has detected a push change in main English repo.
Still have more to learn, haven’t given up yet!
Are you getting cold feet on the entire-site-repo idea??
No! I was revisiting the “mycelium” middleman repo idea for docs because I got stuck on the webhooks.
Since the build.js
script fetches some docs from github, I thought why not keep all the docs in on separate repo where gitlocalize can manage the sync against the source content. The language repos would essentially become site building machines tuned to fetch their respective languages.
I made a little sandbox here of a docs middleman repo that redwoodjs.com, fr.redwoodjs.com, ja.redwoodjs.com etc. could pull from during the build process.
The content translations are managed in git localize here
Gitlocalize marks translations as incomplete if content in sorresponsing source
file changes or new ones are added.
Then I modified the build.js
file for a hypothetical ja.redwoodjs.com repo that contains the cameronjs-y magic for building a redwood site. Only difference is it sources it’s content from the mycelium repo. BASE_PATH
is the path for translated content, FALLBACK_PATH
is the path for English content.
Lots of hairiness still as I notice the docs are sourced from multiple places and can be difficult to decouple for build. Also takes manual updates to include new translations.
ANYWAY, was just trying it out to compare methods. I will continue to explore the webooks method (if anyone is good at github webhooks do get in touch!)