Better code highlighting with Tree-sitter

Hi Jekyll community!

I recently wrote a “how-to” article on integrating Tree-sitter into Jekyll to get better code highlighting on my site: “Syntax highlight your Jekyll site with Tree-sitter!”.

It was a fun challenge figuring out how to do things like get Ruby to call Tree-sitter’s Rust bindings. At the end of the article I also have some fun comparisons of Tree-sitter against Jekyll’s default highlighter, Rouge. I hope you find it as interesting as I did, and please let me know if you have questions or suggestions! Cheers!


While this may not be something I need, I want to congratulate you on your excellent write up. You are a very good teacher!

1 Like

Thank you very much for the kind words! :slight_smile:

1 Like