Moving to Zola
After using hugo for a couple of years for this, I recently switched to zola,
basically because I found hugo to be incredibly confusing and to require a lot of complexity I
don't care about. I just want to render some markdown files and scrape some of them to generate ATOM
and RSS feeds, more or less.
The process I went through to do this was:
- Be annoyed for two years.
- Play around with
zolafor ten minutes and decide it's nice. -
Spend a couple of evenings writing yet more Go code to read in
hugomarkdown files, and write them out again with the frontmatter converted fromhugo's fairly tolerantyamlformat tozola's more stringenttoml. - Add a basic
zolaconfig file. - Run the converter.
-
Get a bunch of errors from
zolaabout quite legit things, like nonsense timestamps on sections, revert the changes from the converter and fix them in the originalhugomarkdown files. - Repeat several times.
- Run the converter and get no errors.
- Look at the warnings.
-
Fix the language on a bunch of code fence blocks, e.g.
nginx->conf, with commands like:(cd content && fd --glob '*.md' --type file --exec sd '```nginx' '```conf')(edit: I spent five minutes trying to get the backticks to work in both markdown and sh and have now given up). -
Add
sort_by="date"to some sections, since the default is ... not that. - Realise I'd fucked up the trailing newline in every file and fix that (and fix it in the converter, too).
- port over my shortcodes, which was very easy, then rewrite the uses of them by hand (there were only a few).
-
Add some missing redirects, they go the opposite direction in
zola- a page can declare aliases, whereas inhugoaliases declare which page they point to.
Overall, some top class procrastination. A++ would faff again.