summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-02-02 14:07:24 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-02-02 14:07:24 +0100
commit732fdc9894fe8002c91b309ba8aeafc99e9f5be3 (patch)
tree089c0ced6af22c7cc532eb3c776d210250aed107 /src
parentc4b1fd5900bdff5c94891b7b1c9e764653d572a3 (diff)
downloadhakyll-732fdc9894fe8002c91b309ba8aeafc99e9f5be3.tar.gz
Fixed indexUrl error with html pages.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Hakyll/File.hs2
-rw-r--r--src/Text/Hakyll/Page.hs1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Hakyll/File.hs b/src/Text/Hakyll/File.hs
index 92f93da..311bd57 100644
--- a/src/Text/Hakyll/File.hs
+++ b/src/Text/Hakyll/File.hs
@@ -78,6 +78,8 @@ toUrl path = do enableIndexUrl' <- askHakyll enableIndexUrl
, ".text"
, ".tex"
, ".lhs"
+ , ".htm"
+ , ".html"
]
isIndex = (dropExtension $ takeFileName path) == "index"
withSimpleHtmlExtension = flip addExtension ".html" $ dropExtension path
diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs
index 63c5a40..2a1eae8 100644
--- a/src/Text/Hakyll/Page.hs
+++ b/src/Text/Hakyll/Page.hs
@@ -67,6 +67,7 @@ writerOptions = defaultWriterOptions
-- | Get a render function for a given extension.
getRenderFunction :: String -> (String -> String)
getRenderFunction ".html" = id
+getRenderFunction ".htm" = id
getRenderFunction ext = writeHtmlString writerOptions
. readFunction ext (readOptions ext)
where