diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-10 19:39:24 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-10 19:39:24 +0100 |
commit | 15733a1a1ab5f01ae7595506a8809317326f362d (patch) | |
tree | 42074ee9c6155deb5159b9d5ce998d7c87632520 /src/Text/Hakyll | |
parent | 6bcad2701a49ae422144111276b2815eb35311a4 (diff) | |
download | hakyll-15733a1a1ab5f01ae7595506a8809317326f362d.tar.gz |
Fixed bug in toURL.
Diffstat (limited to 'src/Text/Hakyll')
-rw-r--r-- | src/Text/Hakyll/File.hs | 4 |
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 |