Built with Gatsby
I let the contract for my old domain run out a long time ago, and since then I’ve also been on a blogging hiatus (except for posts written for company blogs). But recently I figured it was time to create a simple personal site again and maybe write a little something every now and then.
One of the first things to figure out was which tool(s) to use. So, as a first post, here’s a brief overview of the tech behind this MVP of my site.
Static site generators have become quite popular over the last couple of years, and they seemed much more interesting to me than Wordpress and the likes when it comes to blogging. Comparing a few popular solutions like Jekyll and Hugo, I decided to go with Gatsby.
Gatsby is a relatively new, self-described “Blazing-fast static site generator for React” that has grown tremendously in popularity over the last year or so. Version 2 was just released (September 2018). It uses what’s being considered a modern front-end stack, centered around React and GraphQL.
I used React, and later on Redux, quite heavily in my last job. Also GraphQL to a certain degree. Even though that particular stack is certainly not mandatory for creating a simple site or blog, it made Gatsby look interesting right away. And since it’s only for my private little outlet, there was also no considerable risk of lock-in involved. I also wanted a certain flexibility in terms of tooling, which most other generators didn’t seem to offer to the same extend Gatsby does. There is a load of easy-to-integrate plugins for things like CSS-in-JS available.
Speaking of which… There are many choices for CSS-in-JS out there, and Gatsby provides plugins for at least a couple of them. Styled Components is probably the most popular solution by now and I also went with it for this site.
Getting started with Gatsby is pretty easy. The official site has a nice tutorial and the blog offers a lot of helpful articles. I’m not gonna go into detail here, as this is not meant to be a how-to, but after installing Gatsby you can simply use one of the available “starters”, which are basically templates for sites. I chose the Gatsby starter for creating a blog and adapted the styling. In the simplest case, if you stick to the look & feel of a starter, you just have to provide the content by adding/editing markdown files.
Of course you also need to host your files somewhere, and another plus was that using Netlify for hosting a Gastby site is a breeze. But the docs list several other options and you should basically be able to host it almost anywhere, as for static pages there are obviously no special requirements.
Recently it was also announced that there is a company behind Gatsby now, founded by its creator Kyle Matthews. And one thing they supposedly have on the roadmap is “cloud services” for Gatsby. So the whole ecosystem will probably get even nicer.
So much for now…