Skip to main content
ertius.org

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 want through to do this was:

  1. be annoyed for two years.
  2. play around with zola for ten minutes and decide it's nice.
  3. spend a couple of evenings writing yet more Go code to read in hugo markdown files, and write them out again with the frontmatter converted from hugo's fairly sloppy-tolerant yaml format to zola's more stringent toml.
  4. add a basic zola config file.
  5. run the converter.
  6. get a bunch of errors from zola about quite legit things, like nonsense timestamps on sections, revert the changes from the converter and fix them in the original hugo markdown files.
  7. repeat several times.
  8. run the converter and get no errors.
  9. look at the warnings.
  10. 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).
  11. add sort_by="date" to some sections, since the default is ... not that.
  12. realise I'd fucked up the trailing newline in every file and fix that (and fix it in the converter, too).
  13. port over my shortcodes, which was very easy, then rewrite the uses of them by hand (there were only a few).
  14. add some missing redirects, they go the opposite direction in zola - a page can declare aliases, whereas in hugo aliases declare which page they point to.

Overall, some top class procrastination. A++ would faff again.