summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-08 13:04:45 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-08 13:04:45 +0100
commit54305ea4b97a8bdafc34ae9917c2e73ecada0302 (patch)
treed264bfb38aa498f237191783a4bf91ed5d86c501
parent453e81f746c3a0e254457881cc0ac8609874cf32 (diff)
downloadhakyll-54305ea4b97a8bdafc34ae9917c2e73ecada0302.tar.gz
Added page chain rendering.
-rw-r--r--src/Text/Hakyll/Render.hs9
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