diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2015-04-03 15:14:08 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2015-04-03 15:14:08 +0200 |
commit | df9dba3ef48eb2fc2ef6096fef85a5fd02364e5c (patch) | |
tree | 2ba98d4194bae814c02d01e220b0a0c9ad54b596 /src/Hakyll/Web | |
parent | 46afe343fcb791d5ea1eee03c7b3f3f43c23ee07 (diff) | |
parent | 1ba78f4e0d60770255988519c20bd8ece3d8cca3 (diff) | |
download | hakyll-df9dba3ef48eb2fc2ef6096fef85a5fd02364e5c.tar.gz |
Merge pull request #339 from kadoban/docbook
let pandoc handle DocBook files
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r-- | src/Hakyll/Web/Pandoc.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Web/Pandoc/FileType.hs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/Hakyll/Web/Pandoc.hs b/src/Hakyll/Web/Pandoc.hs index 78df1df..a1b8903 100644 --- a/src/Hakyll/Web/Pandoc.hs +++ b/src/Hakyll/Web/Pandoc.hs @@ -49,6 +49,7 @@ readPandocWith :: ReaderOptions -- ^ Parser options readPandocWith ropt item = fmap (reader ropt (itemFileType item)) item where reader ro t = case t of + DocBook -> readDocBook ro Html -> readHtml ro LaTeX -> readLaTeX ro LiterateHaskell t' -> reader (addExt ro Ext_literate_haskell) t' diff --git a/src/Hakyll/Web/Pandoc/FileType.hs b/src/Hakyll/Web/Pandoc/FileType.hs index 46c8e24..29d08fe 100644 --- a/src/Hakyll/Web/Pandoc/FileType.hs +++ b/src/Hakyll/Web/Pandoc/FileType.hs @@ -22,6 +22,7 @@ import Hakyll.Core.Item data FileType = Binary | Css + | DocBook | Html | LaTeX | LiterateHaskell FileType @@ -39,6 +40,7 @@ fileType :: FilePath -> FileType fileType = uncurry fileType' . splitExtension where fileType' _ ".css" = Css + fileType' _ ".dbk" = DocBook fileType' _ ".htm" = Html fileType' _ ".html" = Html fileType' f ".lhs" = LiterateHaskell $ case fileType f of |