#Best package for code highlighting?
7 messages · Page 1 of 1 (latest)
You could try using highlight.js https://github.com/highlightjs/highlight.js
Thanks! Do you have any tips on how I would make it work on build time and not ship any js to client side?
I guess running it at the top of .astro file will work? Above the --- lines, not sure what it is called actually
There is a section in README that talks about using it on the server https://github.com/highlightjs/highlight.js#nodejs-on-the-server
Yes
You can use the code component https://docs.astro.build/en/reference/api-reference/#code-