summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/Render.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-10-28 13:32:34 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-10-28 13:32:34 +0200
commit6b44cef123af6426a55838707586b6ac95f9db8b (patch)
tree40cadd8818bcdff1cc2650e489103d7a84041532 /src/Text/Hakyll/Render.hs
parent1f169dd0a0132464e74400e3c5625e8a30658a4c (diff)
downloadhakyll-6b44cef123af6426a55838707586b6ac95f9db8b.tar.gz
Add a takeBody function
Diffstat (limited to 'src/Text/Hakyll/Render.hs')
-rw-r--r--src/Text/Hakyll/Render.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Hakyll/Render.hs b/src/Text/Hakyll/Render.hs
index d054f63..16962bb 100644
--- a/src/Text/Hakyll/Render.hs
+++ b/src/Text/Hakyll/Render.hs
@@ -9,7 +9,7 @@ module Text.Hakyll.Render
, writePage
) where
-import Control.Arrow ((>>>))
+import Control.Arrow ((>>>), arr)
import Control.Applicative ((<$>))
import Control.Monad.Reader (liftIO)
import System.Directory (copyFile)
@@ -67,8 +67,8 @@ renderAndConcat templatePaths renderables = HakyllAction
renders = map (>>> render') renderables
actionFunction' _ = do
- contexts <- mapM runHakyllAction renders
- return $ concatMap (fromMaybe "" . M.lookup "body" . unContext) contexts
+ contexts <- mapM (runHakyllAction . (>>> takeBody)) renders
+ return $ concat contexts
-- | Chain a render action for a page with a number of templates. This will
-- also write the result to the site destination. This is the preferred way