on master help sign in
Merge pull request #339 from kadoban/docbook

let pandoc handle DocBook files

commitdf9dba3ef48eb2fc2ef6096fef85a5fd02364e5c authorJasper Van der Jeugt <jaspervdj@gmail.com> dateFri 3 Apr 2015, 15:14 (12 years ago) parent46afe341ba78f4
2 files changed+3
src/Hakyll/Web/Pandoc.hs+1 src/Hakyll/Web/Pandoc/FileType.hs+2
src/Hakyll/Web/Pandoc.hs+1
@@ -49,6 +49,7 @@ readPandocWith :: ReaderOptions -- ^ Parser options
4949readPandocWith ropt item = fmap (reader ropt (itemFileType item)) item
5050 where
5151 reader ro t = case t of
52+ DocBook -> readDocBook ro
5253 Html -> readHtml ro
5354 LaTeX -> readLaTeX ro
5455 LiterateHaskell t' -> reader (addExt ro Ext_literate_haskell) t'
src/Hakyll/Web/Pandoc/FileType.hs+2
@@ -22,6 +22,7 @@ import Hakyll.Core.Item
2222data FileType
2323 = Binary
2424 | Css
25+ | DocBook
2526 | Html
2627 | LaTeX
2728 | LiterateHaskell FileType
@@ -39,6 +40,7 @@ fileType :: FilePath -> FileType
3940fileType = uncurry fileType' . splitExtension
4041 where
4142 fileType' _ ".css" = Css
43+ fileType' _ ".dbk" = DocBook
4244 fileType' _ ".htm" = Html
4345 fileType' _ ".html" = Html
4446 fileType' f ".lhs" = LiterateHaskell $ case fileType f of