# New syntax highlighter

**URL:** <https://zola.discourse.group/t/new-syntax-highlighter/2885>\
**Category:** Uncategorized\
**Created:** [December 4, 2025, 8:56am UTC](https://zola.discourse.group/t/new-syntax-highlighter/2885 "2025-12-04T08:56:17Z")\
**Posts on this page:** 6\
**Page:** 1

<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:** [December 4, 2025, 8:56am UTC](https://zola.discourse.group/t/new-syntax-highlighter/2885/1 "2025-12-04T08:56:17Z")

</div>

I’ve made a TextMate highlighter in Rust: [GitHub - getzola/giallo: Syntax highlighter, same output as VSCode](https://github.com/getzola/giallo)

This will replace the syntect usage in Zola in the next version.

This will output the exact same thing as you see in VSCode and syntaxes will be up to date! No more 5+ years old Rust grammar where it’s not highlighting things properly! Also way more supported languages/themes due to a bigger ecosystem.

[Syntax Highlighting that respects CSS prefers-color-scheme - #6 by uwearzt](https://zola.discourse.group/t/syntax-highlighting-that-respects-css-prefers-color-scheme/226/6) is supported natively without needing to generate CSS files as well.

It’s not in Zola yet but it would be nice to see if some people can try it.

---

<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:** [December 4, 2025, 8:56am UTC](https://zola.discourse.group/t/new-syntax-highlighter/2885/2 "2025-12-04T08:56:41Z")

</div>



---

<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:** [December 19, 2025, 3:25pm UTC](https://zola.discourse.group/t/new-syntax-highlighter/2885/3 "2025-12-19T15:25:21Z")

</div>

Giallo released: [Giallo - syntax highlighting that matches VSCode : rust](https://old.reddit.com/r/rust/comments/1pqntow/giallo_syntax_highlighting_that_matches_vscode/)

---

<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 10, 2026, 5:04pm UTC](https://zola.discourse.group/t/new-syntax-highlighter/2885/4 "2026-01-10T17:04:04Z")

</div>

I’ve just migrated my theme Zolarwind from Zola 0.21 (syntect) to 0.22 (Giallo)  
and wanted to share some feedback on the migration.

Good:

- The switch to TextMate / VS Code grammars feels like a big improvement to me.
- Adding SystemVerilog and VHDL via `extra_grammars` using upstream `.tmLanguage.json` files works reliably once the required top-level `name` field is present (matching the language used after the backticks).  
I’m aware these languages are now already supported, but I used them as examples and wanted to keep them instead of looking for unsupported ones.
- Class-based highlighting integrates well with Tailwind when importing the generated `giallo*.css` into the Tailwind build.

Friction points:

- I didn’t find explicit migration documentation (possibly a Layer-8 issue). Comparing the v0.21.x and v0.22.x documentation side by side did the trick.
- `extra_grammars` paths are filesystem-relative to the site root, not to `static/`, which took some trial and error.
- `giallo*.css` is always generated into `static/` and copied to `public/`.  
Since I import it into my own CSS pipeline (Tailwind), I currently have to explicitly exclude it via `ignored_static` in `config.toml`. It would be nice if the output path were configurable (unless I missed something).

Overall, I think the direction is the right one. The highlighting quality and ecosystem benefits outweigh the migration cost, and the configuration is understandable once the constraints are known.

Thanks for pushing this forward; Giallo is a step up from syntect.

---

<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 10, 2026, 7:44pm UTC](https://zola.discourse.group/t/new-syntax-highlighter/2885/5 "2026-01-10T19:44:37Z")

</div>

> [@thomasweitzel](#):
>
> I didn’t find explicit migration documentation (possibly a Layer-8 issue). Comparing the v0.21.x and v0.22.x documentation side by side did the trick.

It’s in the changelog: [zola/CHANGELOG.md at master · getzola/zola · GitHub](https://github.com/getzola/zola/blob/master/CHANGELOG.md#breaking)

> [@thomasweitzel](#):
>
> `giallo*.css` is always generated into `static/` and copied to `public/`.

I think it makes sense? You want to generate it once and have it committed.

---

<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 11, 2026, 11:50am UTC](https://zola.discourse.group/t/new-syntax-highlighter/2885/6 "2026-01-11T11:50:11Z")

</div>

Thanks for the pointer to the changelog. I had the feeling that I must have missed something.

Regarding `giallo*.css` being generated into `static/`: I can totally live with that, and I understand the rationale of “generate once, commit it, and reuse it”. The minor friction I still see is the exact location: having the file land in the root of `static/` feels forced for a CSS file. Personally, I would put it under something like `static/css/`, if I were using it directly on the site, but that’s subjective. Using `ignored_static` works, so this is not a problem.

In setups where the CSS is consumed by a build pipeline (Tailwind in my case), the import ends up looking like `@import "../../../static/giallo.css";`. Which is functional, but not pretty. A shorter, configurable path would be nicer. Copying the file to a another location is possible, but without some synchronization you lose the guarantee of picking up changes if the generated CSS evolves in future Zola versions.

`Giallo` is a step up from `syntect`, and the highlighting improvement benefits are worth it.

This might be a nice, contained improvement for a PR at some point. I’m not fully comfortable hacking on Zola yet, but this could be a good excuse to start and learn along the way.
