on master help sign in
Add textile support
2c094baJasper Van der Jeugt
hakyll.cabal+1−1
@@ -1,5 +1,5 @@
1Name: hakyll
1Name: hakyll
2−Version: 3.2.6.3
2+Version: 3.2.7.0
3
3
4Synopsis: A static website compiler library
4Synopsis: A static website compiler library
5Description:
5Description:
src/Hakyll/Web/Pandoc.hs+1
@@ -55,6 +55,7 @@ readPandocWith state fileType' id' = case fileType' of
55 readPandocWith state {stateLiterateHaskell = True} t id'
55 readPandocWith state {stateLiterateHaskell = True} t id'
56 Markdown -> readMarkdown state
56 Markdown -> readMarkdown state
57 Rst -> readRST state
57 Rst -> readRST state
58+ Textile -> readTextile state
58 t -> error $
59 t -> error $
59 "Hakyll.Web.readPandocWith: I don't know how to read a file of the " ++
60 "Hakyll.Web.readPandocWith: I don't know how to read a file of the " ++
60 "type " ++ show t ++ fromMaybe "" (fmap ((" for: " ++) . show) id')
61 "type " ++ show t ++ fromMaybe "" (fmap ((" for: " ++) . show) id')
src/Hakyll/Web/Pandoc/FileType.hs+2
@@ -25,6 +25,7 @@ data FileType
25 | OrgMode
25 | OrgMode
26 | PlainText
26 | PlainText
27 | Rst
27 | Rst
28+ | Textile
28 deriving (Eq, Ord, Show, Read)
29 deriving (Eq, Ord, Show, Read)
29
30
30-- | Get the file type for a certain file. The type is determined by extension.
31-- | Get the file type for a certain file. The type is determined by extension.
@@ -48,6 +49,7 @@ fileType = fileType' . takeExtension
48 fileType' ".rst" = Rst
49 fileType' ".rst" = Rst
49 fileType' ".tex" = LaTeX
50 fileType' ".tex" = LaTeX
50 fileType' ".text" = PlainText
51 fileType' ".text" = PlainText
52+ fileType' ".textile" = Textile
51 fileType' ".txt" = PlainText
53 fileType' ".txt" = PlainText
52 fileType' _ = Binary -- Treat unknown files as binary
54 fileType' _ = Binary -- Treat unknown files as binary
53
55