Installing Syntax Highlighting Highlight.js With Defer

Updated on April 14, 2016
In the past I've posted how to install syntax highlighting of Highlight.js , but at that time I still have not found a way to avoid blocking js rendering of Highlight.js . And now I've found a way to overcome blocking js rendering of highlight.js on being deferjavascript so do not bother loading blog. And if anyone wants to try it please follow the way in this post. Highlight.js is one that is light enough syntax highlighting and automatic language can read the code so that we no longer need to add the class to the tag code, just by writing <pre><code> ......... </code></pre> .
AuthorAdhy Suriady
Highlight.js 152 now supports 72 programming languages ​​with the style that we can choose according to taste. 
To begin installing Highlight.js, please follow the steps below. 
1. The First Step The first one we did was choose the style that we will use, simply select the style that fits HERE , please try one by one style Highlight.js to find a match with the style click on the left side of the page. After finding a style that fits, please copy CSS style HERE , simply click on the style selected then copy the CSS code her and please save the above code </style> or ]]> </b:skin> in the Edit HTML of your blog.
 2. Step Two Please copy the javascript code below the above code </body>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script>
//<![CDATA[
function downloadJSAtOnload(){var e=document.createElement("script");e.src="https://googledrive.com/host/0Bz4YdwRI3rnCTFdxX29TaU9WTlU/highlight2.js",document.body.appendChild(e)}window.addEventListener?window.addEventListener("load",downloadJSAtOnload,!1):window.attachEvent?window.attachEvent("onload",downloadJSAtOnload):window.onload=downloadJSAtOnload;
//]]>
</script>
</b:if>
It will also automatically read the tags <i rel="pre"> on the comments of bloggers and display Highlight.js look like in the post. Done ... please you see posts that display the code with the tags pre code luck and hopefully useful.
Share this: pinterest