From 15733a1a1ab5f01ae7595506a8809317326f362d Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 10 Jan 2010 19:39:24 +0100 Subject: Fixed bug in toURL. --- src/Text/Hakyll/File.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Hakyll') diff --git a/src/Text/Hakyll/File.hs b/src/Text/Hakyll/File.hs index 76589e0..ec9d0fb 100644 --- a/src/Text/Hakyll/File.hs +++ b/src/Text/Hakyll/File.hs @@ -34,7 +34,9 @@ toCache path = "_cache" (removeLeadingSeparator path) -- | Get the url for a given page. toURL :: FilePath -> FilePath -toURL = flip addExtension ".html" . dropExtension +toURL path = if takeExtension path `elem` [".markdown", ".md", ".tex"] + then flip addExtension ".html" $ dropExtension path + else path -- | Get the relative url to the site root, for a given (absolute) url toRoot :: FilePath -> FilePath -- cgit v1.2.3