summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-10 19:39:24 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-10 19:39:24 +0100
commit15733a1a1ab5f01ae7595506a8809317326f362d (patch)
tree42074ee9c6155deb5159b9d5ce998d7c87632520 /src/Text/Hakyll
parent6bcad2701a49ae422144111276b2815eb35311a4 (diff)
downloadhakyll-15733a1a1ab5f01ae7595506a8809317326f362d.tar.gz
Fixed bug in toURL.
Diffstat (limited to 'src/Text/Hakyll')
-rw-r--r--src/Text/Hakyll/File.hs4
1 files changed, 3 insertions, 1 deletions
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