summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Hakyll')
-rw-r--r--src/Text/Hakyll/File.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Hakyll/File.hs b/src/Text/Hakyll/File.hs
index a7ed7b3..649f2a3 100644
--- a/src/Text/Hakyll/File.hs
+++ b/src/Text/Hakyll/File.hs
@@ -45,7 +45,9 @@ toCache :: FilePath -> Hakyll FilePath
toCache path = do dir <- askHakyll cacheDirectory
return $ dir </> removeLeadingSeparator path
--- | Get the url for a given page.
+-- | Get the url for a given page. For most extensions, this would be the path
+-- itself. It's only for rendered extensions (@.markdown@, @.rst@, @.lhs@ this
+-- function returns a path with a @.html@ extension instead.
toUrl :: FilePath -> FilePath
toUrl path = if takeExtension path `elem` [ ".markdown"
, ".md"