redwoodjs/learn.redwoodjs.com

Update stale source tutorial docs

Closed this issue ยท 12 comments

The English tutorial content is current as of Nov 10, 2020...

We need to manually backfill the commits from .com made on and after Nov 11, 2020 (starting with commit titled auth.js)

Here are the commits
https://github.com/redwoodjs/redwoodjs.com/commits/main?before=f78c0475ead96097b552c9fd3ba133401630f52c+35&branch=main&path%5B%5D=TUTORIAL.md

Unfortunately this is not so simple as git diffing, as the single long TUTORIAL.md file from .com has been split into sections on "learn".

It will involve checking the commit, finding some text that reveals the commit's context, using Algolia search or project search in "learn" to find the associated section and update it to mirror the commit.

If all goes well, this will automatically trigger Crowdin to require updates in the French translation.

Hmmm, could you just copy/paste each entire section over top of the one in the learn repo? Just bulk over-write everything in each section of the learn repo with that same section from .com main and commit? Git'll figure out what's actually different and the commit will only reflect the few typo updates and such. We could do each section as a separate commit or just do them all in one commit.

Or would that freak out Crowdin?

Hmmm, could you just copy/paste each entire section over top of the one in the learn repo?

Unfortunately not so simple...

While the added frontmatter would be easy to duck beneath paste under, I had to do a lot of manual tweaking of unclosed html tags (breaks react mdx builds), manually tweak all the code line highlighting to a different syntax, and change relative links as to not break when building other locales.

Maybe i could make a script to automatically do all of that parsing then copy/paste whole sections

Sounds like a job for Regex!

@clairefro is there any plan to move the tutorials to this site and off the main redwoodJS site? If not, this will possibly become a recurring theme. I know I just had a PR merged this morning updating docs on the main site. I could see all of those sections moving to here eventually so that they can all be translated.

I should have some time this week and could start working on this. That is unless we want it done with Regex then I punt!

^ But it's as simple as having Perl man swoop in and save the day!

is there any plan to move the tutorials to this site and off the main redwoodJS site?

That was the plan at one point (with links from .com to the tutorial on learn.redowood.com). Now Tutorial part 2 is up on .com . Maybe once part 2 is ported over (translation can be "Coming soon!"). I need to talk to Rob about this

Ok, let me know, I can port over Tutorial 2 in the same way we did Tutorial 1. I won't do anything though until I get the green light....especially if Perl Man is going to swoop in to save the day.

^ I'm working on a script.... maybe humans won't need to do this

WIP: https://github.com/clairefro/pinecone

(it's node, not Perl ๐Ÿ˜ž )

Just need to add frontmatter now. If it works, I may be able to jig up a github action to automate this process every time an update is made to .com tutorial (until learn takes off)

@clairefro that's awesome! I suck at Regex, not something I have to use very often writing code for programming industrial robots.

So basically if I am reading the code correctly, it just reparses the entire file and replaces the existing files in the learn repo? At least that is the intent as I read it.

Regex is a game!

Yes that's basically it - except instead of pushing the output to the learn repo it currently just outputs locally

image

Awesome script @clairefro!

I was able to complete the pinecone tool for our needs and update this repo's English docs.

It is now easy to manually sync using the tool. I am investigating now how to make this a github action... but it's complicated when it is cross-repo so don't hold your breath