A Fresh Coat Of Paint

Using Zola as my preferred static site generator

After using Hugo for over eight months I got tired of it and looked for other alternatives. That's when I stumbled upon Zola. Zola is a static site generator (SSG), similar to Hugo, Pelican, and Jekyll.

It is written in Rust and uses the Tera template engine, similar to Jinja2, Django templates, Liquid, and Twig. SSGs use dynamic templates to transform content into static HTML pages. Static sites are thus very fast and require no databases, making them easy to host.

My previous Hugo site used a theme because I wasn't really ready to learn Go's template engine. I'm already familiar with Python Django and its template system so using Tera wasn't hard because it's similar to jinja2 and the Django template syntax.

Content is written in CommonMark, a strongly defined, highly compatible specification of Markdown. Zola uses pulldown-cmark to parse markdown files. The goal of this library is 100% compliance with the CommonMark spec. It adds a few additional features such as parsing footnotes, Github-flavored tables, Github-flavored task lists, and strikethrough.

Zola comes with built-in syntax highlighting, but you must first enable it in the configuration file.

Zola is very minimalistic, it is installed only as a single binary, with no extra dependencies needed. It is configured in toml and you only use what is needed. For example here is the configuration for this site config.toml:

title = "Ian Andwati"
description = "Ian Andwati's personal website"
base_url = "https://andwati.github.io"

generate_categories_pages = false
generate_tags_pages = false
generate_feed = true
feed_filename = "rss.xml"
minify_html = false
taxonomies = [{ name = 'tags', feed = false }]
compile_sass = true

[markdown]
highlight_code = true
highlight_theme = "gruvbox-dark"

[link_checker]

[extra]
author = "Ian Andwati"

Inspiration

The motivation to use Zola also came from my decision to move from independently developed themes. I decided to write the HTML and CSS myself and endeavor to maintain the site individually. The base CSS is borrowed from Reilly Tucker Siemens who had created a nice gruvbox palette for his site.

I improved on it by adding an archive page, pagination, a comment system, and Google Analytics (more of these in later posts). I also implemented article read time and word count.

What next

The site is a work in progress and is far from polished. I plan on implementing a newsletter to notify readers of new posts. The site is primarily a dark theme, in the future I'll also add theme toggling and maybe different palettes.

You can subscribe to the site's RSS feed at https://andwati.github.io/rss.xml.