Choosing the Right Static Site Generator

Hello, analysis paralysis, my old friend.

This post isn’t really interesting for anyone but myself – unless you’re somehow looking for a static site generator, and have the exact same needs as I do.

But I’m writing the post anyway. My free time for the next couple of weeks will probably be used to dig into static site generators. That will mean less time for writing, but I want to try to post at least 100 posts this year. Yeah, it’s a cheap approach, but it’s not as cheap as just posting random videos from YouTube1.

The first thing to notice is that there are many static site generators out there. In fact, there are too many of them for their own good, and analysis paralysis will hit you straight in the face. There are a couple of resources online that can help, though. Myles Braithwaite keeps a curated list of around 80 static site generators, StaticGen lists 281 different ones, and the site Static Site Generators has no less than 460 static site generators in its directory.

I opted for StaticGen as my static site generator source. The site lets you sort the them by number of stars they have on GitHub, and the number of followers they have on Twitter. Both numbers are pretty arbitrary in terms of how good they fit my needs, but they can be used as an indication of the generator’s usage in the wild.

The List.

After a few hours of diving into the documentation of some of the more popular static site generators in StaticGen, I ended up with the following list:

  • Next.js – Written in JavaScript, and uses React for templates, which makes it an excellent choice for building front-end programming experience.
  • Hugo is written in Go (also known as Golang), which makes it a bad choice to get front-end experience. But Go is a language I’d like to get some experience with for my back-end work. I’m also seeing Hugo being used quite often on sites belonging to people who are active in the indieweb movement.
  • Jekyll is written in Ruby. That makes it as irrelevant as anything written in PHP in terms of getting any useful programming language experience. But it’s been around since 2008, and is still quite popular, which I consider a stamp of approval.
  • Hexo is a static site generator aimed at bloggers, which is neat because that’s me! It’s written in JavaScript, and supports a wide range of template languages.
  • 11ty isn’t high up on the list on StaticGen, no matter how you sort it. But it’s mentioned a lot when I search online for static site generators. 11ty is written in JavaScript and is described as “an alternative to Jekyll” on its website.

What’s Next?

I’ve installed Ubuntu on a disposable VirtualBox image. That way I can test and experiment as much as I want without the risk of breaking anything.

Exactly how I should go about to most efficiently test the static site generators in the list, I’m honestly not sure. I’m not even sure if a static site generator will cover my needs. How will it handle images, for instance? How can I show a random one-liner in the footer on every page? Do I have to do that with AJAX calls? How do I embed site features like A Picture A Day and A Book A Month in a generated site? Perhaps parts of the site still has to be dynamically generated? Maybe I have too many features on this site? Perhaps I should just focus on writing, even if blogging is slowly being chocked to death by video and social media?

The questions are many, the answers are few. I really hope that I manage to answer most of the questions before I give up and just stick with WordPress for another 12 years.

Footnotes

  1. The latter would probably have been more interesting for most of you, though.

By Vegard Vines Skjefstad

2 replies on “Choosing the Right Static Site Generator”

Thank you!

I’ve read through some of the Hugo documentation, and from what I’ve read so far, it looks like Hugo is a very good match for my needs.

Leave a Reply

Your email address will not be published.