This theme implements a built-in Jekyll feature, the use of Rouge, for syntax highlighting. It supports more than 100 languages. This example is in C++. All you have to do is wrap your code in a liquid tag:

The keyword linenos triggers display of line numbers. Produces something like this:

class TestClass:
  def __init__(self):
    pass