From 732fdc9894fe8002c91b309ba8aeafc99e9f5be3 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Tue, 2 Feb 2010 14:07:24 +0100 Subject: Fixed indexUrl error with html pages. --- src/Text/Hakyll/File.hs | 2 ++ src/Text/Hakyll/Page.hs | 1 + 2 files changed, 3 insertions(+) (limited to 'src') 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 -- cgit v1.2.3