Wednesday, August 15, 2018

Syntax Highlighting with Prism.JS on

To enable syntax highlighting using Prism.JS. Insert the following code at the end of the header of your Blogger theme.

<link href='' rel='stylesheet'/>

<script src='' type='text/javascript'/>

To include code in the blog, switch to html and insert the following code:

<pre class="lang-bash"><code>

#This is programming code for shell script


For other language we replace bash with c,  cpp, csharp, docker, javascript, swift, objectivec or python.

For more language code please refer to the end of the main page of Prism.JS.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.