diff options
Diffstat (limited to 'src/Text')
-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 |