@@ -1,7 +1,6 @@
1module Text.Hakyll.Render
1module Text.Hakyll.Render
3 renderPage,
3 renderPage,
6 renderAndConcat,
5 renderAndConcat,
7 renderChain,
6 renderChain,
@@ -38,10 +37,6 @@ renderPage templatePath page = do
38 let body = substitute templateString (createContext page)
37 let body = substitute templateString (createContext page)
39 return $ M.insert "body" body page
38 return $ M.insert "body" body page
41−renderAndWrite :: FilePath -> Page -> IO ()
42−renderAndWrite templatePath page =
43− renderPage templatePath page >>= writePage
45writePage :: Page -> IO ()
40writePage :: Page -> IO ()
46writePage page = do
41writePage page = do
47 let destination = toDestination $ getURL page
42 let destination = toDestination $ getURL page
@@ -57,8 +52,8 @@ renderAndConcat templatePath paths = foldM concatRender' B.empty paths
57 let body = getBody rendered
52 let body = getBody rendered
58 return $ B.append chunk $ body
53 return $ B.append chunk $ body
60−renderChain :: FilePath -> [FilePath] -> IO ()
55+renderChain :: [FilePath] -> FilePath -> IO ()
61−renderChain pagePath templates = depends (toURL pagePath) (pagePath : templates) $
56+renderChain templates pagePath = depends (toURL pagePath) (pagePath : templates) $
62 do page <- readPage pagePath
57 do page <- readPage pagePath
63 result <- foldM (flip renderPage) page templates
58 result <- foldM (flip renderPage) page templates
64 writePage result
59 writePage result