New Site - Plus Gatsby JS
9th August 2018
So, you might be noticing that this site is looking pretty swanky right about now. Just kidding, no one reads this ಠ_ಠ. Nevertheless, the site has been completely rebuilt, and that's what this article is about.
Unlike my blog rebuild you probably have noticed this new framework taking the JS world by storm: Gatsby JS. In case you haven't, the short summary is that it's a static site generator, powered by GraphQL and React (colloquially known as a web developer's wet dream).
A static site generator takes all the complexity of a full fledged CMS and simplifies it down to the generated HTML+CSS+JS files. No more worrying about a database, a LAMP (or similar) stack, or shitty shared hosting. On top of all that, page speed is ludicrous. For this site I went with a Markdown file based approach to storing each blog post, but the options are limitless. You could even pull in posts from WordPress using the official Rest API if you want the benefits of a static site without having to leave WordPress completely.
So Gatsby takes all of that, and makes it stupidly simple to get a react based site up and running. Plus, it includes server side rendering and static generation out of the box - you don't have to do anything to get it. On top of that, because it's built on GraphQL, you can finally have the motivation to learn yet another JS framework. Trust me, it's worth it, GraphQL is awesome.
I'd been thinking about moving this site away from WordPress for a while now. Although WordPress is a platform I am deeply familiar with, and even quite like - I felt it was time for me to learn something completely different. Gatsby seemed like the obvious choice at the time of development. For something as simple as my little dev blog, it was more than powerful enough - plus it came with none of the heft and pain of dealing with a WordPress install. As an added bonus, I can now host it for free with one of the free tiers offered by hosts such as Netlify, Now or even just Github Pages. Spoiler: I chose Netlify.
If you'd like to check out the source code (it's not really anything special), it's up on GitHub here.
You should give it a shot, I have a feeling you won't be dissapointed - I was very pleasantly suprised!