Easy Syntax Highlighting in Ghost

You can quickly and easily add syntax highlighting to the default Ghost theme (Casper) using Google's Prettify.

Edit your theme

Open content/themes/casper/default.hbs and add the following line in the {{! Styles'n'Scripts }} section:

<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>  

Format your post

When writing your code blocks, add prettyprint lang-javascript directly after your opening line of backticks like so:

 ```prettyprint lang-javascript
 // Code goes here

Boom. Highlighting. If you need to highlight other languages, refer to Google's Documentation.