Wednesday, September 10, 2025

Formatting code in Blogger

I have been using Github gists to share code and I have no plan of abandoning it. For smaller/one liners, I sometimes use div element with inline CSS.

I have been exploring formatting my code directly in Blogger but it is mostly hit and miss. I came accross highlight.js and I am impressed with the result.

Below is a quick guide how to format code using highlight.js:
  1. Open blogger template
  2. Before the <head> element, add the following
  3. In the post itself, soround the code like:

No comments:

Installing TigerVNC in Ubuntu 24.04

Installing TigerVNC in Ubuntu 24.04 Ubuntu 24.04 supports RPD protocol but it behaves in a way that is not fit for my needs. The Desktop Sh...