Migrating to a Static Site Generator

I wanted to find a Static Site Generator with a GUI to make my blog writing easier.

Intro

I've had an online presence, in the form of a personal website with my own domain, since at least 2007.
Many different sites were put there, but nothing too important or that I was happy with.
In 2019 I created a new logo, the "ambigram worm" (because it's inspired by NASA's "worm" logo, and it's actually an ambigram), and in 2022 I started using the roundel behind it. It's the one used at the top of this site. I liked the result, and started applying it (with different color combinations) to all my sites. In the end, I created a few static sites with this new image, and was happy with the result.

Doing things manually

Then I decided I wanted to write a few blog posts. I made a template, and since I wasn't going to update frequently, I made everything manually, even the RSS. Not a big problem, right?

I realized it was a burden as soon as I wanted to write a new post. It was tedious, so I needed a tool to generate this blog. I didn't want an online tool, because maintaining it is a chore and a constant headache. So I decided to find for a static site generator.

Why a static site?

Creating a static site has a lot of benefits: the security risks are greatly reduced, to the point of being negligible. It's quite fast, as there's no need to render content every time something new is published. Once the content is generated, it's very unlikely that anything will break, unless it's you breaking it, so in my view, it's a great option, specially for small sites like mine.

The problem with blogging software

The problem with software like Wordpress is that they are very complex pieces of code, with a lot of parameters, innumerable plugins, and themes that may, or may not, be compatible with the version you are installing. They need constant updates as new vulnerabilities are found regularly, which ironically, can break things. And they've become jack-of-all-trades solutions, being used for blogs, shops, portfolios, etc. If what you want is a simple page with a humble blog, and nothing more, Wordpress may be overkill, more a problem than a solution. I've heard of many people that set up sites using Wordpress, only to find later that they've suffered some kind of hack, and the site was redirecting to shady places (my brother was one of them).

Enter Static Site Generators

Jekyll Commands
Don't worry, it's easy!

So, the other option is Static Site Generators. There are a lot of these: Jekyll, Hugo, Eleventy, Nikola, Pelican... there are actually too many to list them all. These are great, normally very fast, and solve most of your problems. In this case, the problem is that most of them are CLI (Command Line Interface, aka the "Command Prompt" or "Terminal"), so they're not user friendly for people that are not programmers or comfortable with the Command Line.

In the past, I knew of a couple tools with a GUI (Graphical User Interface) that generated static sites, and were made for Mac Users: Hammer and CodeKit. I used Hammer in the past, and loved the app, but development stopped in 2019 (though now it seems there will be a new version), so I changed to CodeKit. It's great too. The problem is that none of them generates blog, just sites. The contrary is Publii: in the beginning, it was focused mainly on static blogs, but offered very few options for static pages. It was great if you only wanted a blog. But things have changed, and it's the tool I decided to use now.

Why Publii?

In a sense, Publii is similar to Wordpress, but running inside your computer. The template structure is designed for blogs, with predefined blocks like head, menu, blog page and footer, and contrary to Hammer/Codekit, where you can define your own includes. This is necessary because generating a blog has specific requirements, so it's not a problem.

The good thing about Publii now is that some time ago it started supporting Pages, and the ability to set up a page as your Homepage, which for me is exactly what I needed (I don't want the blog to be the main entrance to the site, it's more of an accessory living is a sub-directory).

Publii editor
This is actually easy...

Another problem that Publii solves is that it's multi-platform, available for Mac, Windows and Linux. Considering that the content will be generated inside the app itself, is great if I, a Mac user, want to create the site and then somebody else who's not a Mac user will be the person writing the blog posts and publishing it. Oh! and also, it's open-source, and free (though I encourage you to donate to it).

So, it solves a workflow that I've been trying to solve for quite a long time: have a tool, easy to use (with a GUI), where you can create sites with blogs, test them and than a client, friend or relative can use it to generate a whole site (including blog) in an easy way, regardless of their operating system. Maybe a two app solution would be better (one to create the site, and one to create the content), as there would be less risk of someone breaking something, but as there are not many options for this problem, it's the best solution one can find.

Now, following the documentation, I started modifying the "Blank" theme to create my own theme, hacking a few solutions in the process. 😄

The end result

I setup a sub-domain, configured Publii to upload the rendered pages to it, and it's all hosted there, for anybody to check: https://test.damianvila.com

You can compare the result with my original site at https://damianvila.com. Of course, a few compromises had to be made, so it's not exactly 1:1, but it's almost the same, save for a few minor changes. Let me know what you think by commenting on the Mastodon post associated with this post. Cheers!

Edit: It's now uploaded to my main site!

  • Damian
  • blog
  • publii
  • static site
  • website