5 ms·
Ask HN: 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 7y agohttps://prismjs.com/ 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/ https://jacobobryant.com/post/2019/learn-clojure/
- mtmail 7y agostatickit.com and css-tricks.com both seem to use https://prismjs.com/ https://prismjs.com/ for highlighting