diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-10-28 13:32:34 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-10-28 13:32:34 +0200 |
commit | 6b44cef123af6426a55838707586b6ac95f9db8b (patch) | |
tree | 40cadd8818bcdff1cc2650e489103d7a84041532 /src/Text/Hakyll/Render.hs | |
parent | 1f169dd0a0132464e74400e3c5625e8a30658a4c (diff) | |
download | hakyll-6b44cef123af6426a55838707586b6ac95f9db8b.tar.gz |
Add a takeBody function
Diffstat (limited to 'src/Text/Hakyll/Render.hs')
-rw-r--r-- | src/Text/Hakyll/Render.hs | 6 |
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 |