diff options
Diffstat (limited to 'site.hs')
-rw-r--r-- | site.hs | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -6,15 +6,17 @@ import Text.Pandoc.Highlighting -- Pass custom options to the Pandoc compiler pandocCompiler :: Compiler (Item String) -pandocCompiler = - let defaultExtensions = writerExtensions defaultHakyllWriterOptions - addedExtensions = extensionsFromList [Ext_lists_without_preceding_blankline] - removedExtensions = extensionsFromList [Ext_blank_before_header, Ext_blank_before_blockquote] - writerOptions = defaultHakyllWriterOptions { - writerExtensions = disableExtensions (defaultExtensions <> pandocExtensions <> addedExtensions) removedExtensions, - writerHTMLMathMethod = MathML - } - in pandocCompilerWith defaultHakyllReaderOptions writerOptions +pandocCompiler = pandocCompilerWith readerOptions writerOptions where + writerOptions = defaultHakyllWriterOptions { + writerExtensions = writerExtensions defaultHakyllWriterOptions + <> pandocExtensions, + writerHTMLMathMethod = MathML + } + readerOptions = defaultHakyllReaderOptions { + readerExtensions = readerExtensions defaultHakyllReaderOptions + <> pandocExtensions + <> extensionsFromList [Ext_lists_without_preceding_blankline] + } -- Loads the template specified in a post's metadata, if it exists loadLayoutTemplate :: Context String -> Item String -> Compiler (Item String) @@ -50,7 +52,7 @@ main = hakyll $ do >>= loadLayoutTemplate defaultContext >>= relativizeUrls - -- Additionally copy non-HTML files verbatium + -- Additionally copy non-HTML files raw, without front matter match ("**.md" .||. "**.rst" .||. "**.org" .||. "**.adoc") $ version "raw" $ do route idRoute compile getResourceBody |