title: Using MathJax with Jekyll
body: <p>I have a Jekyll blog and I want to use MathJax with it, in the sense that I want to be able to type something like</p>
  
  <pre><code>$$\sum_{n=1}^\infty 1/n^2 = \frac{\pi^2}{6}$$
  </code></pre>
  
  <p>in my markdown files, and have the correct LaTeX expression generated with MathJax, in a similar way to how it is done at <a href="https://gist.github.com/2912921" rel="noreferrer">math.stackexchange</a>.</p>
  
  <p>What is the easiest way to do this? Currently I have the file <a href="https://gist.github.com/2912921" rel="noreferrer">jsmath.js</a> (GitHub gist) in my directory, and I thought I could have a simple file named <code>mathjs</code> in my <code>_includes</code> directory with the line</p>
  
  <pre><code>&lt;script src="path/to/jsmath.js&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and include that in each post via</p>
  
  <pre><code>{% include mathjs %}
  </code></pre>
  
  <p>but this doesn't seem to work - when I run <code>jekyll --server</code> the page is generated, but none of the content is visible.</p>
  
  <p>Am I going about this the right way? Is there a better way to use MathJax with Jekyll?</p>