on master help sign in
Add textile support
commit2c094ba80b1fa06fc60602a25acdf68af28a1682 authorJasper Van der Jeugt <m@jaspervdj.be> dateThu 29 Mar 2012, 12:37 (15 years ago) parent13ec906
3 files changed+4−1
hakyll.cabal+1−1 src/Hakyll/Web/Pandoc.hs+1 src/Hakyll/Web/Pandoc/FileType.hs+2
hakyll.cabal+1−1
@@ -1,5 +1,5 @@
11Name: hakyll
2−Version: 3.2.6.3
2+Version: 3.2.7.0
33
44Synopsis: A static website compiler library
55Description:
src/Hakyll/Web/Pandoc.hs+1
@@ -55,6 +55,7 @@ readPandocWith state fileType' id' = case fileType' of
5555 readPandocWith state {stateLiterateHaskell = True} t id'
5656 Markdown -> readMarkdown state
5757 Rst -> readRST state
58+ Textile -> readTextile state
5859 t -> error $
5960 "Hakyll.Web.readPandocWith: I don't know how to read a file of the " ++
6061 "type " ++ show t ++ fromMaybe "" (fmap ((" for: " ++) . show) id')
src/Hakyll/Web/Pandoc/FileType.hs+2
@@ -25,6 +25,7 @@ data FileType
2525 | OrgMode
2626 | PlainText
2727 | Rst
28+ | Textile
2829 deriving (Eq, Ord, Show, Read)
2930
3031-- | Get the file type for a certain file. The type is determined by extension.
@@ -48,6 +49,7 @@ fileType = fileType' . takeExtension
4849 fileType' ".rst" = Rst
4950 fileType' ".tex" = LaTeX
5051 fileType' ".text" = PlainText
52+ fileType' ".textile" = Textile
5153 fileType' ".txt" = PlainText
5254 fileType' _ = Binary -- Treat unknown files as binary
5355