If you are using Ghost blog and want to highlight your code block in your blog post, I'm going to show you a simplest way to do it ;).
Step 1: Add Prism CSS to your blog header
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/themes/prism.min.css" />
This link is default theme of Prism, they have several themes(dark, okaidia...) and you can find them in cdnjs.
Access your Ghost admin, navigate to Code injection, add the line above to your Blog Header.
That link current version is 1.14.0, but you can check the latest version at the time you read this post.
Step 2: Add Prism JS to your blog footer
Access your Ghost admin, navigate to Code injection, add the line above to your Blog Footer.
That's all for setting up!
How to use
You will see:
let show = () => console.log('Hello'); show();
html and so on...
Happy blogging :)
Subscribe to Nguyen Tran
Get the latest posts delivered right to your inbox