From 6a4b09e1c2c06f4dcd30c4ecd7bcb60462c95a2e Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Mon, 23 Mar 2015 10:08:45 -0700 Subject: let pandoc handle DocBook files --- src/Hakyll/Web/Pandoc.hs | 1 + src/Hakyll/Web/Pandoc/FileType.hs | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/Hakyll') 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..a6d0dbd 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,8 @@ fileType :: FilePath -> FileType fileType = uncurry fileType' . splitExtension where fileType' _ ".css" = Css + fileType' _ ".docbook" = DocBook + fileType' _ ".db" = DocBook fileType' _ ".htm" = Html fileType' _ ".html" = Html fileType' f ".lhs" = LiterateHaskell $ case fileType f of -- cgit v1.2.3 From 1ba78f4e0d60770255988519c20bd8ece3d8cca3 Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Mon, 30 Mar 2015 13:21:16 -0700 Subject: change file extension to .dbk for docbook --- src/Hakyll/Web/Pandoc/FileType.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Hakyll') diff --git a/src/Hakyll/Web/Pandoc/FileType.hs b/src/Hakyll/Web/Pandoc/FileType.hs index a6d0dbd..29d08fe 100644 --- a/src/Hakyll/Web/Pandoc/FileType.hs +++ b/src/Hakyll/Web/Pandoc/FileType.hs @@ -40,8 +40,7 @@ fileType :: FilePath -> FileType fileType = uncurry fileType' . splitExtension where fileType' _ ".css" = Css - fileType' _ ".docbook" = DocBook - fileType' _ ".db" = DocBook + fileType' _ ".dbk" = DocBook fileType' _ ".htm" = Html fileType' _ ".html" = Html fileType' f ".lhs" = LiterateHaskell $ case fileType f of -- cgit v1.2.3