diff options
Diffstat (limited to 'src/Hakyll/Web/Pandoc')
-rw-r--r-- | src/Hakyll/Web/Pandoc/Biblio.hs | 4 | ||||
-rw-r--r-- | src/Hakyll/Web/Pandoc/FileType.hs | 43 |
2 files changed, 26 insertions, 21 deletions
diff --git a/src/Hakyll/Web/Pandoc/Biblio.hs b/src/Hakyll/Web/Pandoc/Biblio.hs index c85512f..53e3419 100644 --- a/src/Hakyll/Web/Pandoc/Biblio.hs +++ b/src/Hakyll/Web/Pandoc/Biblio.hs @@ -104,8 +104,8 @@ readPandocBiblio ropt csl biblio item = do -- actual page. If we don't do this, pandoc won't even consider them -- citations! let Biblio refs = itemBody biblio - pandoc = itemBody $ readPandocWith ropt item - pandoc' = processCites style refs pandoc + pandoc <- itemBody <$> readPandocWith ropt item + let pandoc' = processCites style refs pandoc return $ fmap (const pandoc') item diff --git a/src/Hakyll/Web/Pandoc/FileType.hs b/src/Hakyll/Web/Pandoc/FileType.hs index 46c8e24..3636e41 100644 --- a/src/Hakyll/Web/Pandoc/FileType.hs +++ b/src/Hakyll/Web/Pandoc/FileType.hs @@ -22,10 +22,12 @@ import Hakyll.Core.Item data FileType = Binary | Css + | DocBook | Html | LaTeX | LiterateHaskell FileType | Markdown + | MediaWiki | OrgMode | PlainText | Rst @@ -38,29 +40,32 @@ data FileType fileType :: FilePath -> FileType fileType = uncurry fileType' . splitExtension where - fileType' _ ".css" = Css - fileType' _ ".htm" = Html - fileType' _ ".html" = Html - fileType' f ".lhs" = LiterateHaskell $ case fileType f of + fileType' _ ".css" = Css + fileType' _ ".dbk" = DocBook + fileType' _ ".htm" = Html + fileType' _ ".html" = Html + fileType' f ".lhs" = LiterateHaskell $ case fileType f of -- If no extension is given, default to Markdown + LiterateHaskell Binary -> Markdown -- Otherwise, LaTeX + LiterateHaskell or whatever the user specified x -> x - fileType' _ ".markdown" = Markdown - fileType' _ ".md" = Markdown - fileType' _ ".mdn" = Markdown - fileType' _ ".mdown" = Markdown - fileType' _ ".mdwn" = Markdown - fileType' _ ".mkd" = Markdown - fileType' _ ".mkdwn" = Markdown - fileType' _ ".org" = OrgMode - fileType' _ ".page" = Markdown - fileType' _ ".rst" = Rst - fileType' _ ".tex" = LaTeX - fileType' _ ".text" = PlainText - fileType' _ ".textile" = Textile - fileType' _ ".txt" = PlainText - fileType' _ _ = Binary -- Treat unknown files as binary + fileType' _ ".markdown" = Markdown + fileType' _ ".mediawiki" = MediaWiki + fileType' _ ".md" = Markdown + fileType' _ ".mdn" = Markdown + fileType' _ ".mdown" = Markdown + fileType' _ ".mdwn" = Markdown + fileType' _ ".mkd" = Markdown + fileType' _ ".mkdwn" = Markdown + fileType' _ ".org" = OrgMode + fileType' _ ".page" = Markdown + fileType' _ ".rst" = Rst + fileType' _ ".tex" = LaTeX + fileType' _ ".text" = PlainText + fileType' _ ".textile" = Textile + fileType' _ ".txt" = PlainText + fileType' _ ".wiki" = MediaWiki + fileType' _ _ = Binary -- Treat unknown files as binary -------------------------------------------------------------------------------- |