on master help sign in
Fixed bug in toURL.
commit15733a1a1ab5f01ae7595506a8809317326f362d authorJasper Van der Jeugt <jaspervdj@gmail.com> dateSun 10 Jan 2010, 19:39 (17 years ago) parent6bcad27
1 file changed+3−1
src/Text/Hakyll/File.hs+3−1
src/Text/Hakyll/File.hs+3−1
@@ -34,7 +34,9 @@ toCache path = "_cache" </> (removeLeadingSeparator path)
3434
3535-- | Get the url for a given page.
3636toURL :: FilePath -> FilePath
37−toURL = flip addExtension ".html" . dropExtension
37+toURL path = if takeExtension path `elem` [".markdown", ".md", ".tex"]
38+ then flip addExtension ".html" $ dropExtension path
39+ else path
3840
3941-- | Get the relative url to the site root, for a given (absolute) url
4042toRoot :: FilePath -> FilePath