diff options
-rw-r--r-- | src/Text/Hakyll/File.hs | 11 | ||||
-rw-r--r-- | src/Text/Hakyll/Page.hs | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/Text/Hakyll/File.hs b/src/Text/Hakyll/File.hs index 0ed91d5..2378ae9 100644 --- a/src/Text/Hakyll/File.hs +++ b/src/Text/Hakyll/File.hs @@ -39,7 +39,16 @@ toCache path = "_cache" </> (removeLeadingSeparator path) -- | Get the url for a given page. toURL :: FilePath -> FilePath -toURL path = if takeExtension path `elem` [".markdown", ".md", ".tex"] +toURL path = if takeExtension path `elem` [ ".markdown" + , ".md" + , ".mdn" + , ".mdwn" + , ".mkd" + , ".mkdn" + , ".mkdwn" + , ".text" + , ".tex" + ] then flip addExtension ".html" $ dropExtension path else path diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs index 6788240..d338542 100644 --- a/src/Text/Hakyll/Page.hs +++ b/src/Text/Hakyll/Page.hs @@ -60,10 +60,8 @@ renderFunction ".html" = id renderFunction ext = writeHtmlString writerOptions . readFunction ext defaultParserState where - readFunction ".markdown" = readMarkdown - readFunction ".md" = readMarkdown - readFunction ".tex" = readLaTeX - readFunction _ = readMarkdown + readFunction ".tex" = readLaTeX + readFunction _ = readMarkdown -- | Read metadata header from a file handle. readMetaData :: Handle -> IO [(String, String)] |