One of the beauties of Ghost is that you can implement multiple technologies such as PrismJS. In some cases, you want to not only give some sauce to your code syntax, but you also are looking to highlight specific lines of your code.
In those cases, using the syntax highlight plugin of PrismJS is. very useful. Now, for Ghost users, using this could become a hassle, because you don't use the regular 'code block'.Get PrismJS
So, how can you use it within the editor then? Easy, with a HTML card. The trick is to convert the HTML block in a code block with your specifications:
<pre class="line-highlight" data-line="3"><code class="lang-css"> </code></pre>
When you put your code within this lines, you'll:
- Present it with syntax highlight.
- Adjust the language and show it.
- Show the line highlighted (in this case, i selected line #3).
It will look like this:
With this, you can use line-highlight without any issues within Ghost.
What do you think about using the line highlight feature? Are you a heavy user? Let me know in the comments.