Highlight code snippets

An example of code snippets in Jekyll:

def print_hello_world(): 
    # print "hello world!" in terminal
    print('hello world!')

Display math equations using MathJax

An example of math equations in Jekyll (MathJax):

MathJax can be imported externally inside the header of /_layouts/x.html to allow posts that use x.html as layout template to display math equations as follow:

<script type="text/x-mathjax-config">
        jax: ["input/TeX","output/HTML-CSS"],
        displayAlign: "left",
        displayIndent: "5em"

If you use the default Jekyll theme minima, you can also download the default post.html from minima and add MathJax to it. This blog’s repo provides a working example of Jekyll default theme (Minima) with MathJax installed.