It should come as no surprise that I’m a big fan of gatsbyjs. It works really well and produces pretty modern setups.
Over the weekend I started working on a version of jenkins.io that is entirely powered by nodejs + gatsby, instead of nodejs+ruby+awestruct. I’m not sure its a great plan, but I had fun starting it.
Current Version: Jenkins Community Blog
My Version: Jenkins
Code: GitHub - halkeye/gatsby-jenkins-io: Prototype version of jenkins.io using gatsby
I’m in general not a great organized writer, but I wanted to get everything out.
Random notes so far.
gatsby uses preloading and doesn’t need to fully download the page (just the json that rendered the page), so transitions are faaaaaaaaaast
the current awestruct stuff is all over the place. There GitHub - jenkins-infra/asciidoctor-jenkins-extensions: Extensions to asciidoctor syntax for Jenkins-related materials and then lots of custom ruby code in the various templates. Lots of re-implementation, then side scripts
current awestruct doesn’t seem to work with built in version of mac ruby, so docker is required
Docker for ruby and node seem to be a large barrier for a lot of new comers
I fought for days trying to get the existing deploy to github pages to deploy properly (Turns out i had a broken old gh-pages branch, but no error messages). but was able to use the gh-pages npm module super quickly. So much easier to deploy copies to demo behavior. Especially once we eventually get support for deploying PRs via jenkins infra
Can move a lot of the hard coded things, like events on the main page, into seperate yaml or adoc files and have graphql manage the logic of what to show and not have to manually update (There’s currently a comment that says update this after oct 2nd)
No tests. React is pretty testable these days. (I was going to say plugin-site has lots of tests, but I only found one, https://github.com/jenkins-infra/plugin-site/blob/13067fa4ab47636e77be6af61f915e6b04068b87/tests/pages/404.jsx)
- Have to re-implement everything (I’m having fun so far, learning tons about gatsby and graphql, so no complaints yet)
At the moment I’m having fun. If nobody thinks its a good idea, i’ll probably poke around till I get bored and stop. If docs team is happy with it, i’ll push hard to get it all done.
(We should probably get a docs sig category in discourse)