Hello, world

Posted on 2017‒07‒02


I document my experiences in producing this blog with Hakyll and nginx.

Getting this blog set up has taught me a lot about how the web works in practice.

After playing around with Yesod for a while, I switched to the static website framework Hakyll. Yesod's great—I've used it for producing simple forms—but in retrospect was definitely overkill: who really needs a comments section, anyways? Hakyll's native support for Pandoc markdown (my goto for documentation) was what tipped me to abandon my early work with Yesod.

The Pandoc integration is especially important to me because of Pandoc's ability to painlessly produce equations (via MathJax)
$$\det\,\mathbf{K}(t_1,t_1,\ldots,t_n)=\sum_{I=\mathbf{n}}(-1)^{\lvert I\rvert} t^{n-\lvert I\rvert}\prod_{i\in I}t_i\prod_{j\in I}(D_j+\lambda_jt_j)\det\mathbf{A}^{(\lambda t)}(\bar{I}\mid\bar{I})\text{,}$$
highlighted code blocks

myPandocCompiler :: Compiler (Item String)
myPandocCompiler = pandocCompilerWith 
  (defaultHakyllWriterOptions {
        writerHTMLMathMethod = MathJax "http://common.countingto.one/MathJax/MathJax.js"
      , writerTabStop = 2
      , writerCiteMethod = Citeproc
      , writerVariables = [
          ("csl", "templates/chicago-author-date.csl")
        , ("link-citations", "true")
      , writerColumns = 80

and citation generation (see (MacFarlane 2017)).


MacFarlane, John. 2017. pandoc-citeproc (version https://github.com/jgm/pandoc-citeproc.