diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2009-12-08 13:04:45 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2009-12-08 13:04:45 +0100 |
commit | 54305ea4b97a8bdafc34ae9917c2e73ecada0302 (patch) | |
tree | d264bfb38aa498f237191783a4bf91ed5d86c501 /src/Text/Hakyll | |
parent | 453e81f746c3a0e254457881cc0ac8609874cf32 (diff) | |
download | hakyll-54305ea4b97a8bdafc34ae9917c2e73ecada0302.tar.gz |
Added page chain rendering.
Diffstat (limited to 'src/Text/Hakyll')
-rw-r--r-- | src/Text/Hakyll/Render.hs | 9 |
1 files changed, 2 insertions, 7 deletions
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 |