Ryan Durk

The Best Blog Software for JavaScript Developers

I've wanted to restart my blog for awhile now. So, these are the thoughts I had, and how I came to run this blog (Next.js pushed to a GitHub repo that's hosted on Netlify).

Objectives (How we'll evaluate our options)

  • Start publishing as fast as possible
  • Use a custom theme without having to learn too much
  • Minimize ongoing maintenance

Tech choices

  1. Static or Dynamic?
    Starting with this question si reasonable, since either answer will exclude many potential choices. Static takes much less setup and maintence, and comes with several cheap and managed hosting options (S3/Cloudfront, Amplify, Netlify, GitHub, etc. So, this one's easy, really. Static.

  2. Straight HTML or static site generator? Straight HTML doesn't get as much love as it should. But for blogs, particularly the type where you want to publish new posts with minimum fuss, I favor writing in Markdown and auto-generating the index page, etc. Also, it's nice to be able to update the theme incrementally. End the end, though, my goal with this blog is writing as much content as possible. So, reducing the friction of making new posts gives some benefit I can realize now. This finesses the "you ain't gonna need it" agile development principle by finding a way I actually do need it.

  3. Which static site generator? There are plenty of these, with Jeykyll and Hugo being among the most popular standalone solutions. But, those come with their own configuration to learn and ways to setup themes. On the surface, it looks like Jeykyll has slightly better documentation, which tips me in favor to that. But, if you want to customize your styling, you have to learn a whole lot about themes. Overall I think it would take at least a weekend to get there. I'd rather not learn a new templating language, new configuration files, etc. Using popular and stable projects generally means they've made reasonable choices with their undelrying architecture and user-experience (although not always...), so it is tempting to offload those decisions to people who've already thought long and hard about them. On the other hand, the only things my blog will have is some pages with content and an index page with links to content. In other words, there's not too many ways to mess this up because its requirements are so simple. So, a React-based static site generator seems to fit the bill. Then, which one? Gatsby, for instance, has a huge following and tons of plugins. But, I don't really need them, at least yet. There are a few others listed on staticgen.com, but really we're not even looking for the optimal solution, just one that checks all our boxes so we can get to work. Next.js, then, is a well-documented framework that let's you write a blog like any other React app, satisficing our requirements. Flipping through their user-guide, it's clear there's some magic (like _app.js imported everywhere), but it's easy to wrap your head around that. It also helps that their "getting started guide" involves building a blog anyway.