@@ -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