Static Site Generators – or what I will use for

23:36:32 – so late again, damn it 🤦‍♂️

Ok, so I finally did the last lesson in my node course today and I am ready to crush on React. I tinkered around with Gatsby a bit and this static site generator feels awesome. And there I had this idea, a thing I wanted to for a long time.

I love WordPress and the ecosystem, but I also want to go new ways for Codalong. So let’s talk about what I will build.

Codalong will be video focused, so most of the content will only be available as a video, but for some news or updates, I still need the CMS component. Also for pages, like contact, imprint and so on. Since I don’t publish 10 times a day, I took a look again into static site generators and found GatsbyJS. I don’t want to lose the comfort that I have with WordPress. For example I write all my content in Ulysses, which publishes directly to WordPress and I am so used to it, since I use it since 2009 or so.

Gatsby seems perfect for my plan. The main content, the YouTube videos, will be pulled in every day, via cron job, or I will try to come up with some push mechanism over Zapier or so. After pulling them, Gatsby should render all to static files and therefore the site will be super fast and won’t require a big server behind it, since all the work is done before and the video processing is done by YouTube. For the other reasons mentioned above, I will use WordPress, but in headless mode, I will only use the admin backend and the JSON or GraphQL api, preferable the second one, because that’s the way Gatsby wants to consume data.

I have already written a WordPress publish hook plugin which posts the whole post as JSON to an endpoint, which could a little express app behind Gatsby, just to tell it to create new content.

Ok, sounds like a plan, see you tomorrow Friendos! 23:46:23

Leave a Reply

Your email address will not be published. Required fields are marked *