3 Jun 2020

Static Site Generators

In my last post, I mentioned that my next step in my blog migration was to look at which static site generator (SSG) to use. I'm interested in an open source SSG that I can modify to suit my specific blogging workflow. I've been a long term user of the Open Live Writer tool, so I want something that will be just as simple to use. I've been impressed by K Scott Allen's series of posts on custom blog publishing tools to replace Open Live Writer, and also by Chris Ferdinandi's article on his blogging setup.

My specific requirements for an SSG are:
  • Is an actively maintained open source project
  • Has a range of plugins (for tasks like generating tabular data from spreadsheets)
  • Has decent documentation to allow me to get started (note, this is where most open source projects fail in my opinion).
  • Is written in a language I have familarity with (.NET, Java, JavaScript) or I am interested in learning (Rust, Python, Go), so that I can customize the SSG (and possibly contribute back to the project).
  • Uses Markdown templates [See below]
  • Has a range of responsive templates to allow me to get started blogging quickly.

In my original requirements post, I had been interested in drafting my posts in Markdown, probably using MarkdownPad2. However, over the past 3-4 weeks, I have started a new role in work, which along with general lockdown craziness, means I've had relatively little free time to blog. When I have sat down to work on this post, I haven't been interested in crafting a Markdown document or raw HTML - I want to quickly write up a few paragraphs and post. Given that, I've decided to look at using a CMS (possibly headless) instead of drafting everything in raw HTML/Markdown. This will probably mean a combination of a CMS and SSG.

Looking at the most popular static site generators are (Hugo, Gatsby) and some less common (11ty, Pretzel), we have:

Project Language Template Type Comments
Hugo Go HTML No plugins, but significant 3rd party tooling exists, including resources from migrating from other systems (including Blogger). Extensive documentation.
Gatsby JavaScript (React) React One of the most popular SSGs, with a cloud based option and a rich plugin ecosystem.
Jekyll Ruby Liquid One of the original SSGs, it is a relatively simple SSG geared around blogging. It is feature rich but has poor performance when compiling posts compared to newer options.
Next.js JavaScript React Framework A minimalistic framework for server-rendered React applications as well as statically exported React apps. If using the React farmework wasn't bad enough, it also supports CSS-in-JS.
Nuxt JavaScript Vue Inspired by Next.js, but based on the Vue framework instead of React.
Pelican Python Jinja2 for themes, supports Markdown or reStructuredText for posts Allows import from WordPress, Dotclear, or RSS feeds. A smaller project with less detailed documentation.
Metalsmith JavaScript Handlebars, JavaScript Metalsmith is an extremely simple, pluggable static site generator. All the logic is handled that are chained together. While this makes it very flexible, it can mean it takes longer to configure than other SSGs. Poor documentation.
Eleventy JavaScript HTML, Markdown, JavaScript and others. A simpler static site generator, written in JavaScript as an alternative to Jekyll. Transforms a directory of templates (of varying types) into HTML.
InkPaper Go Markdown, Golang An fast and simple static blog generator. Not a particularly active GitHub project. No plugin support, poor documentation.
Pretzel .NET Liquid A simple, pluggable site generation tool written in .NET (C#). Pretzel follows the same convensions as Jekyll and should be compatible with basic Jekyll websites. This is a relatively simple SSG that has not yet been updated to use .NET Core.
Publii JavaScript Handlebars Publii is a desktop-based CMS for Windows and Mac that makes creating static websites fast and hassle-free. Users can enjoy the benefits of a super-fast and secure static website, with all the convenience that a CMS provides. The app runs locally on your desktop rather than on the site's server.
Gridea JavaScript (Vue) JavaScript A static blog writing client. A relatively new project, and a lot of the documentation is in Chinese.


After considering the above options, I've decided to go with Hugo. The lack of plugin support initially put me off, but it does seem to support data driven templates. Eleventy also looks interesting, and if Hugo doesn't work out, I'll possibly use it instead. Both Gridea and Publii look useful, but I think I need to look more depth for a CMS in another post.

In my next blog post, I'm going to look at setting up Hugo and starting to write a test blog with it.

Resources


No comments:

Post a comment

Note: only a member of this blog may post a comment.