on master help sign in
let pandoc handle DocBook files
commit6a4b09e1c2c06f4dcd30c4ecd7bcb60462c95a2e authorJoshua Simmons <joshua.simmons@emptypath.com> dateMon 23 Mar 2015, 10:08 (12 years ago) parent46afe34
2 files changed+4
src/Hakyll/Web/Pandoc.hs+1 src/Hakyll/Web/Pandoc/FileType.hs+3
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+3
@@ -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,8 @@ fileType :: FilePath -> FileType
3940fileType = uncurry fileType' . splitExtension
4041 where
4142 fileType' _ ".css" = Css
43+ fileType' _ ".docbook" = DocBook
44+ fileType' _ ".db" = DocBook
4245 fileType' _ ".htm" = Html
4346 fileType' _ ".html" = Html
4447 fileType' f ".lhs" = LiterateHaskell $ case fileType f of