In order to escape the backtick ``` in a codeblock you can wrap it in more backticks. For example the following:
```
var k = 0;
```
In the above I have wrapped it in four backticks (and used five backticks to demonstrate this):
````javascript
```
var k = 0;
```
````
I used this on my own blog which is powered by Ghost! That is all there is to it, I am not sure this will help anyone but there it is :)