Inspired by fastai’s blog template, I setup MathJax for Jekyll on this blog today.

Now I can write stuff like $\sum_n (x)$, or alternatively in this form:

\[\sum_n (x)\]

Setup involves two steps:

  1. Adding this code snippet to _includes/head.html.
  2. Adding use_mathjax: true to the _config.yml file.

Afterwards, I was able to write LaTeX right in my markdown blog post files, invoking the above examples with $\sum_n (x)$ and $$\sum_n (x)$$, respectively.