on master help sign in
Fixed bug in toURL.
15733a1Jasper Van der Jeugt
src/Text/Hakyll/File.hs+3−1
@@ -34,7 +34,9 @@ toCache path = "_cache" </> (removeLeadingSeparator path)
34
34
35-- | Get the url for a given page.
35-- | Get the url for a given page.
36toURL :: FilePath -> FilePath
36toURL :: FilePath -> FilePath
37+toURL path = if takeExtension path `elem` [".markdown", ".md", ".tex"]
37−toURL = flip addExtension ".html" . dropExtension
38+ then flip addExtension ".html" $ dropExtension path
39+ else path
38
40
39-- | Get the relative url to the site root, for a given (absolute) url
41-- | Get the relative url to the site root, for a given (absolute) url
40toRoot :: FilePath -> FilePath
42toRoot :: FilePath -> FilePath