Sunday, December 13, 2020

Make you blogger posts colorful with highlightjs

Long time ago I started blogging about tech stuff and changed a lot of platform from wordpress to my own hosted blog and for some reasons I started using blogger with my custom domain and when it comes to add code snippet in the posts, github's gist feature was my first choice but it involves writing snippet and adding its reference into my blog which is more than one step process. For that reason I recently explored highlightjs for code highlighting in my posts and it works great. The configuration is easy 1 step process. Configuration: To configure highlightjs into blogger, just go to the theme option in your blogger control panel and click customize. After that in the page header add following script:

<link href="//"
<script src="//"></script>
And you have successfully configured it.

To utilize that add you content inside <pre><code>...</code></pre> and it will be highlighted.

No comments:

Post a Comment

The Morning Mash # 83

Information - Monsters Weekly 226 - Building GitHub Actions in C#   - Validate Service-Level Objectives of REST APIs Using Iter8 by Sriniv...