on master help sign in
Fixed indexUrl error with html pages.
732fdc9Jasper Van der Jeugt
src/Text/Hakyll/File.hs+2
@@ -78,6 +78,8 @@ toUrl path = do enableIndexUrl' <- askHakyll enableIndexUrl
78 , ".text"
78 , ".text"
79 , ".tex"
79 , ".tex"
80 , ".lhs"
80 , ".lhs"
81+ , ".htm"
82+ , ".html"
81 ]
83 ]
82 isIndex = (dropExtension $ takeFileName path) == "index"
84 isIndex = (dropExtension $ takeFileName path) == "index"
83 withSimpleHtmlExtension = flip addExtension ".html" $ dropExtension path
85 withSimpleHtmlExtension = flip addExtension ".html" $ dropExtension path
src/Text/Hakyll/Page.hs+1
@@ -67,6 +67,7 @@ writerOptions = defaultWriterOptions
67-- | Get a render function for a given extension.
67-- | Get a render function for a given extension.
68getRenderFunction :: String -> (String -> String)
68getRenderFunction :: String -> (String -> String)
69getRenderFunction ".html" = id
69getRenderFunction ".html" = id
70+getRenderFunction ".htm" = id
70getRenderFunction ext = writeHtmlString writerOptions
71getRenderFunction ext = writeHtmlString writerOptions
71 . readFunction ext (readOptions ext)
72 . readFunction ext (readOptions ext)
72 where
73 where