# Code highlighting workflows in Zola 0.22.0

**URL:** <https://zola.discourse.group/t/code-highlighting-workflows-in-zola-0-22-0/2898>\
**Category:** Uncategorized\
**Created:** [January 22, 2026, 3:12pm UTC](https://zola.discourse.group/t/code-highlighting-workflows-in-zola-0-22-0/2898 "2026-01-22T15:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasweitzel](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/thomasweitzel/32/1011_2.png) [@thomasweitzel](https://zola.discourse.group/u/thomasweitzel)\
**Post date:** [January 22, 2026, 3:12pm UTC](https://zola.discourse.group/t/code-highlighting-workflows-in-zola-0-22-0/2898/1 "2026-01-22T15:12:30Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [January 22, 2026, 7:33pm UTC](https://zola.discourse.group/t/code-highlighting-workflows-in-zola-0-22-0/2898/2 "2026-01-22T19:33:52Z")

</div>

> [@thomasweitzel](#):
>
> Zola doesn’t overwrite existing `giallo-*.css`, so when I change the themes I have to delete those files manually before running `zola build`.

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

> [@thomasweitzel](#):
>
> If I reference those files in templates with SRI (`get_hash`), build fails when they’re missing, so I have to skip SRI.

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

---

<div class="post-metadata">

**Author:** ![thomasweitzel](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/thomasweitzel/32/1011_2.png) [@thomasweitzel](https://zola.discourse.group/u/thomasweitzel)\
**Post date:** [January 22, 2026, 8:42pm UTC](https://zola.discourse.group/t/code-highlighting-workflows-in-zola-0-22-0/2898/3 "2026-01-22T20:42:14Z")

</div>

> [@keats](#):
>
> Should it generates them on every build? Not hard to do and probably better to avoid surprises

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.

> [@keats](#):
>
> 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 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!
