I’ve migrated my blog to a new platform

I’ve decided to switch to self hosting my stuff and move away from Tumblr. I like Tumblr, but somehow it doesn’t represent me anymore. As I write this not all articles have been migrated. But what was old is new again (i.e. I edited some of the old ones). Go and read everything again now!

I blog rarely, so there isn’t much longform content to migrate. Unfortunately, I am quite verbose when it comes to microblogging, memes and sharing articles. I treat my blog like Facebook. So I have a bunch of old deprecated posts (e.g. links not working), as well as posts I found cool at some point and now seem lame :) Those I will obviously not migrate, but this is what is taking my valuable quarantine time these days.

Choosing the right platform to migrate

Today, the talk of the town are static site generators and since I had it with wordpress, I decided to give these a try. After a bit of research on Google as well as here: https://www.staticgen.com/ , I went and tried the most popular candidates.

Here’s what went into the mix when I had to choose:

  • flexibility in modifying things myself
  • how big and active is the community
  • how easy it is to maintain
  • how steep is the learning curve (i.e. how fast I can spin up a working blog)

The runners up were Hugo and Gatsbyjs. NextJS is definitely worth considering, but somehow it didn’t click with me. Felt like there is too much complexity that I have to learn. I was not planning to write my own components and maintain them through upgrades for a simple blog. However, it gives you great flexibility, so if you are building something more complex, it’s probably the right choice.

Hugo is written in Go and much faster than Gatsby, which is written in Javascript (node/react).

However after trying both an deciding they are both very respectable products, I realised that speed is not important in generation, because generation is off-line and one time. Following that all that is served is static content. So I went with the evil I knew best: NodeJs - hence Gatsby.

Let’s talk tech

Let me start by saying that if you are happy to read code and use a “starter project”, you’ll be fully in control in about 2 hours, juggling plugins and probably even modifying or writing your own.

But first, please please please don’t make the mistake I made. Don’t install and customise your gatsbyjs, just to find out it is version 1 and the theme migration to version 2 will take you forever. Choose a good compatible theme with GatsbyJs 2.0.

If you have time (what else do you have to do in quarantine after all?), feel free to build your own theme, but that will not fit in the 2 hours time.

Useful commands to be aware of:

  • gatsby develop - builds your dev version of the static website and starts a server to preview your changes live
  • gatsby build - builds your production version into the public folder
  • gatsby recipes - new addition in the past week or so - preforms various tasks like installing plugins, themes, etc. You can also write your own recipe.

Plugins worth installing:

About the author

Mircea Danila Dumitrescu is a highly technical advisor to startups, CTO, Entrepreneur, Geek, Mentor, Best AI Startup Winner, who previously ran multiple complex systems with billions of records and millions of customers.