From 54305ea4b97a8bdafc34ae9917c2e73ecada0302 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Tue, 8 Dec 2009 13:04:45 +0100 Subject: Added page chain rendering. --- src/Text/Hakyll/Render.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/Text/Hakyll/Render.hs') diff --git a/src/Text/Hakyll/Render.hs b/src/Text/Hakyll/Render.hs index a554fd5..c611a88 100644 --- a/src/Text/Hakyll/Render.hs +++ b/src/Text/Hakyll/Render.hs @@ -1,7 +1,6 @@ module Text.Hakyll.Render ( depends, renderPage, - renderAndWrite, writePage, renderAndConcat, renderChain, @@ -38,10 +37,6 @@ renderPage templatePath page = do let body = substitute templateString (createContext page) return $ M.insert "body" body page -renderAndWrite :: FilePath -> Page -> IO () -renderAndWrite templatePath page = - renderPage templatePath page >>= writePage - writePage :: Page -> IO () writePage page = do let destination = toDestination $ getURL page @@ -57,8 +52,8 @@ renderAndConcat templatePath paths = foldM concatRender' B.empty paths let body = getBody rendered return $ B.append chunk $ body -renderChain :: FilePath -> [FilePath] -> IO () -renderChain pagePath templates = depends (toURL pagePath) (pagePath : templates) $ +renderChain :: [FilePath] -> FilePath -> IO () +renderChain templates pagePath = depends (toURL pagePath) (pagePath : templates) $ do page <- readPage pagePath result <- foldM (flip renderPage) page templates writePage result -- cgit v1.2.3