---------------------------------------------------------------------------------- | A module dealing with pandoc file extensions and associated file typesmoduleHakyll.Web.Pandoc.FileType(FileType(..),fileType,itemFileType)where--------------------------------------------------------------------------------importSystem.FilePath(splitExtension)--------------------------------------------------------------------------------importHakyll.Core.IdentifierimportHakyll.Core.Item---------------------------------------------------------------------------------- | Datatype to represent the different file types Hakyll can deal with by-- defaultdataFileType=Binary|Css|DocBook|Html|LaTeX|LiterateHaskellFileType|Markdown|MediaWiki|OrgMode|PlainText|Rst|Textilederiving(Eq,Ord,Show,Read)---------------------------------------------------------------------------------- | Get the file type for a certain file. The type is determined by extension.fileType::FilePath->FileTypefileType=uncurryfileType'.splitExtensionwherefileType'_".css"=CssfileType'_".dbk"=DocBookfileType'_".htm"=HtmlfileType'_".html"=HtmlfileType'f".lhs"=LiterateHaskell$casefileTypefof-- If no extension is given, default to Markdown + LiterateHaskellBinary->Markdown-- Otherwise, LaTeX + LiterateHaskell or whatever the user specifiedx->xfileType'_".markdown"=MarkdownfileType'_".mediawiki"=MediaWikifileType'_".md"=MarkdownfileType'_".mdn"=MarkdownfileType'_".mdown"=MarkdownfileType'_".mdwn"=MarkdownfileType'_".mkd"=MarkdownfileType'_".mkdwn"=MarkdownfileType'_".org"=OrgModefileType'_".page"=MarkdownfileType'_".rst"=RstfileType'_".tex"=LaTeXfileType'_".text"=PlainTextfileType'_".textile"=TextilefileType'_".txt"=PlainTextfileType'_".wiki"=MediaWikifileType'__=Binary-- Treat unknown files as binary---------------------------------------------------------------------------------- | Get the file type for the current fileitemFileType::Itema->FileTypeitemFileType=fileType.toFilePath.itemIdentifier