In our job, it can be really useful to expose a bloc of code without execute it. Generally, we can use Markdown or some Wiki to do it. But sometimes, we want to use it on a website.
And in this case, HighlightJS is our savior!
What is HighlightJS?
And currently 192 languages and 242 styles are implemented!
How to use it?
<pre> <code> ... </code> </pre>
Otherwise, you can define which language to highlight
or add a class to ignore some blocks.
Their documentation is quite complete, so go check it if you want more informations!
- HighlightJS website : https://highlightjs.org/
I hope it will help you ! 🍺
Top comments (0)