HACKER Q&A
📣 webappsecperson

How do you display code examples on your site?


I'm looking for a nice way of presenting HTML code snippets with syntax highlighting (doesn't have to be editable).

I've previously used highlightjs but haven't been enamored with it.

I particularly like:

- https://statickit.com/ - https://css-tricks.com

Anyone have any tips? I'd love to hear what other people are using.


  👤 jacobobryant Accepted Answer ✓
https://prismjs.com/

I like it a lot. Simple, works great. Examples (these snippets are highlighted for bash and clojure): https://jacobobryant.com/post/2019/learn-clojure/


👤 mtmail
statickit.com and css-tricks.com both seem to use https://prismjs.com/ for highlighting