Hakyll and MathJax

Posted on June 2, 2017

Using MathJax with Hakyll

let readerOptions = defaultHakyllReaderOptions
let writerOptions = defaultHakyllWriterOptions { writerHTMLMathMethod = MathJax "" }

pandocCompilerWith readerOptions writerOptions

and add MathJax script to global html template

<script type="text/javascript" async
        src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
      
      title        Hakyll and MathJax    
      url            /posts/hakyll-mathjax/      
      path          posts/hakyll-mathjax.tex     
      date          June  2, 2017     
      author   
      metadata 
      missing  
      teaser   
      snippet