First thoughts on Zola
- 542 words
- 3 min
Zola1 is a static site generator in Rust.
Wanting to blog a bit more and having a passing interest in Rust, I figured I might as well rebuild my blog rather than actually write anything...
These are just a few unorganised notes on what I found.
Cobalt & Zola seem to be the first couple of results for "rust static site generator" and Zola's github comes with a handy README.md outlining the features involved.2 I appreciate these tables are always biased & opinionated, especially when put out by one of the projects being compared, but it's nice to get a good overview of the situation. Pagination & taxonomies were likely to be the only differentiating features relevant to me but after trying both out, one of the main (bad) reasons I went with Zola was having easily available themes - I'm not a web designer.3
Zola's documentation is really good, but is one of those that often only fully makes sense once you already understand the system - even the introduction section! (I file git and various bits of Debian's Maintainer guides into this category)
So, I obviously ignored it as a first time user:
$ zola init pricey-blog
Welcome to Zola!
> What is the URL of your site? (https://example.com): https://pricey.uk
> Do you want to enable Sass compilation? [Y/n]: wtf?
Despite a quick check of their getting started & unsure how configurable this would be later, I was really pleased to see my issue dealt with rapidly by the project, so top marks there!
There are a few other bits & pieces I've not quite understood the documentation around, e.g:
-
the built-in function
resize_image
, which is available in template code as well as in shortcodes.I've not been able to get it to work in template code without adding my own shortcode:
$ cat templates/shortcodes/resize_image.html <a href="{{ path | split(pat="/") | last }}"> <img src="{{ resize_image(path=path, width=width, height=height, op=op, format=format) }}" /> </a>
-
While pagination over sections is simple enough, (I have one section currently, 'blog') I didn't immediately figure out how tags & categorise can expose themselves, despite using themes which require they be enabled. Hopefully I'll have something to propose to make the docs clearer on the subject.
-
Finally, RSS generation is a bit broken in a strict sense (but works in the readers I've tried) due to #762.
All in all, Zola has mostly made sense and the couple of interactions I've had with the project were really positive! I hope I'll be able to contribute later.
Footnotes:
I loved the comparison table for acmetool though the software nolonger seems to have died, I too moved to certbot.
Cobalt uses the liquid template language which I presume there are resources available for, but found too difficult to discover in the time I gave.