Code highlighting workflows in Zola 0.22.0

A question about code highlighting workflows in Zola 0.22.0: I’m using markdown.highlighting.light_theme and dark_theme, which generates static/giallo-light.css and static/giallo-dark.css. I’m toggling them client‑side
based on a theme switch. Two pain points I’ve hit:

  1. Zola doesn’t overwrite existing giallo-*.css, so when I change the themes I have to delete those files manually before running zola build.
  2. If I reference those files in templates with SRI (get_hash), build fails when they’re missing, so I have to skip SRI.

Is there a recommended workflow (or a more ergonomic way) to regenerate the giallo files and keep SRI? Any best practice or planned changes here would be appreciated. Thanks!

Should it generates them on every build? Not hard to do and probably better to avoid surprises

Ah it’s a matter of making sure it is called first instead of last in the rendering. An easy fix I’ll include in 0.23

I would definitely prefer this. But if someone makes changes to them it must be clear, that these would be overwritten, so they have to save the modified file under a different name.

I think that would be good, since the content of the files only depends on the theme settings in config.toml. Because templates can use/depend on the generated files, it would nice to have them by then.

Thank you for considering this!