diff options
Diffstat (limited to 'src/Hakyll/Web/Pandoc')
-rw-r--r-- | src/Hakyll/Web/Pandoc/FileType.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Hakyll/Web/Pandoc/FileType.hs b/src/Hakyll/Web/Pandoc/FileType.hs index 670f1eb..a10de1c 100644 --- a/src/Hakyll/Web/Pandoc/FileType.hs +++ b/src/Hakyll/Web/Pandoc/FileType.hs @@ -16,14 +16,15 @@ import Hakyll.Core.Compiler -- default -- data FileType - = Html + = Binary + | Css + | Html | LaTeX | LiterateHaskell FileType | Markdown - | Rst + | OrgMode | PlainText - | Css - | Binary + | Rst deriving (Eq, Ord, Show, Read) -- | Get the file type for a certain file. The type is determined by extension. @@ -31,6 +32,7 @@ data FileType fileType :: FilePath -> FileType fileType = fileType' . takeExtension where + fileType' ".css" = Css fileType' ".htm" = Html fileType' ".html" = Html fileType' ".lhs" = LiterateHaskell Markdown @@ -41,12 +43,12 @@ fileType = fileType' . takeExtension fileType' ".mdwn" = Markdown fileType' ".mkd" = Markdown fileType' ".mkdwn" = Markdown + fileType' ".org" = OrgMode fileType' ".page" = Markdown fileType' ".rst" = Rst fileType' ".tex" = LaTeX fileType' ".text" = PlainText fileType' ".txt" = PlainText - fileType' ".css" = Css fileType' _ = Binary -- Treat unknown files as binary -- | Get the file type for the current file |