Andy Van Slaars

Andy Van Slaars

moon indicating dark mode
sun indicating light mode

Yet another blog rewrite? 🤦‍♂️

November 23, 2019

I spend far less of my day to day writing code lately, but I’m still very much a developer at heart. So, it should come as no surprise that when I sat down a couple weeks ago to write a blog post, I ended up completely replacing my blog. Because, of course I did.

At first, I hated myself a little bit for doing this. I got over it. There were plenty of things I wasn’t happy with in the previous iteration of this site. I used Gatsby (and I’m still am), but at the time, I just used a starter, bastardized a few things to quickly add minor customizations and moved on. I don’t feel like I ever took full advantage of what Gatsby had to offer.

Let’s run down the benefits of this rewrite.

Gatsby themes

Like before, I’ve built this on Gatsby. This time, I’m far more familiar with the ins and outs of Gatsby, and I’m leveraging themes. Gatsby themes are awesome! I installed the Blog theme and the notes theme, then I was able to shadow components to add my own customizations.

Dark Mode 🌑

The Gatsby blog theme comes with theme-ui and a dark/light mode toggle built in. I’m a big fan of dark mode for reading at night (and frequently during the day), so it was nice to be able to add that ability here without having to build it.

MDX

In my previous site, I never managed to get MDX configured properly, this time around, it all works beautifully. I had a couple small hiccups at the beginning where MDX worked for content managed by one theme, but not the other. That turned out to be some minor config that I needed to change and once I got that worked out, it’s all working beautifully!

A separate home page

This site doesn’t have to be just a blog. I broke out the blog and the notes sections of the sites and I now have a more traditional entry page. I can use this to highlight notes and posts I think myight be helpful to folks, I can use it to provide direct links for things like my egghead.io courses and if I end up expanding the site to add more functionality in the future, I have an existing jumping off point for that.

Digital Gardening

I was inspired by Joel Hooks’, who started talking about the idea of a digital garden a while back. In a chat we had over the summer, Joel suggested that maybe I should loosen my stranglehold on my writing and publish with more frequency, instead of sitting on things until they’re “ready”. The truth is, “ready” is hard for me. I dwell on small details and then inevitably get distracted or lose interest and the thing that was probably good enough to be useful never sees the light of day. In an effort to put things out early and often, I’ve added a notes area, where I’ll write, share, and update with far more frequency.

I still have a traditional blog on the site, and I’m planning to publish there too. There’s a non-zero chance that blog posts will fall out from the notes I’m sharing. For notes that are likely to continue evolving, blog posts that come out of theme will represent “snapshots” of the notes at a point in time, edited, and organized for more standard consumption.


I’m really happy with how easy it’s been for me to work with this new setup. Gatsby themes really simplify things by excapsulating a great deal of functionality. Having MDX finally working properly is going to open some doors when it comes to writing about front end code and sharing examples. I think I’m most excited about the addition of the notes section of the site. This gives me a valid “excuse” to constantly publish things, even when they’re partially complete or may never be “finished”. I can put things out there as soon as I have a chance to capture some loose thoughts, then continue to iterate on them in public where they may be useful for others.