Journey to a Static Site

15 September 2015

For the longest time, I was enamored by the idea of having a dynamic site. Everything remotely dynamic on my site was powered by external services such as Disqus or Blogger. Despite that, I imagined I would eventually come up with some cool, dynamic content to put on my site and that I should pre-emptively fill that void if and when I would ever need it. To fill this imaginary need I ended up building my own PHP web framework, complete with its own (really terrible) database layer. I learned a lot while doing it so it was a worthwhile project and it even worked fairly well for a while. Eventually though, it became too large, and debatably too broken of a project to continue working on alone, especially with much better frameworks out there.

I still wanted to push for that dynamic site. My PHP framework wasn’t working out anymore and I didn’t feel like dealing with Wordpress or figuring out another framework, so I turned to Django. I rewrote my site (in under a quarter of the code), wrote importers and exporters that allowed me to automatically pull everything from my site into the new system and was up and running in a couple days. It wasn’t bad, except for the several things I wanted that I hadn’t had time to build, and the several others that were kind of broken. I was still not too keen on maintaining the code, so finding the time to add those features became a challenge, especially in the absence of something new and interesting to work on instead of just making my website operable again…and again.

What’s funny about my insistence aboug having a dynamic site is that my site isn’t particularly dynamic. In fact, it’s gotten less so over the years. When I had Blog comments, it was via Disqus which was much more of a complete service than I would have built myself. Tracking was and is via Google Analytics. All in all, I was maintaining hundreds of lines of code (or in the case of Thenaterweb, thousands) to serve what could just as well be done with something like Jekyll. Or, if I was absolutely insistent on a non-static site, an install of Wordpress, Ghost, or other existing system that I could customize.

A month or two later, after repairing the posting system on my site for the umpteenth time which was broken because of other changes I’d made, I finally decided the gig was up. It turns out that, unsurprisingly, maintaining a dynamic content site alone is a bit of a time sink. More importantly though, I finally was coming to terms with the fact that if I was going to build a service with dynamic content, it probably wouldn’t run off of my personal website. I decided to scrap the pile of Django (which was not worth open-sourcing) that powered my site and switched to Github Pages with Jekyll.

Transitioning to GitHub pages and Jekyll was pretty painless. I found a new and much cleaner template to use, since I was going to be cutting it up into template files for Jekyll and I didn’t want to put work into the one I had, which I wasn’t overly happy with. Since Jekyll’s templates are pretty standard there wasn’t much new to learn so getting everything set up was pretty easy and was just a matter of putting everything in the right place. Jekyll even let me import my blog via my existing feed so I didn’t need to write another slew of code. I was able to make the transition in about a day without any interesting problems.

In the end, I’m pretty happy with it. I dislike deleting code, but I deleted the mess of Django that powered my site for a few months for cathartic reasons. Dropping the pretense that I needed to maintain a framework for some imaginary dynamic content gave me back a lot of time. I won’t claim to have mastered Jekyll at this point, but I will say that it’s way less painful than dealing with the mess of code and broken features that I was slogging through before. There’s also the bonus that I can use Jekyll to dump it as a static site that I can host anywhere. As cool as writing software is, there are places that are better left to more simple solutions so you can focus on writing way cooler things, take it from me.

Care about what the web is doing to our minds? Check out my book, The Thought Trap, at book.thenaterhood.com.

• • •

Stay updated by email
or, grab the feed

Found something wrong? Get in touch.

Share this