Syntax highlighting is pretty. highlight.js can do it in a browser. I just added it to this blog.
- In Blogger, click "Theme" then "Edit HTML"
- Find the <head> section of the theme.
- Insert the following at the end, before the closing <head> tag:
<link href='//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css' rel='stylesheet'/> <script src='//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js'/> <script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/haskell.min.js'/>
- Add as many copies of the third line as you want, modifying
haskell
to the additional languages that you want to be able to highglight. - When writing code, wrap it in
<pre><code class="haskell"> YOUR CODE </code><pre>
No comments:
Post a Comment