summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/Render.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-10 23:28:57 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-10 23:28:57 +0100
commitd83791c106bf898e4397b592133642fbed5b8568 (patch)
treed0b5c30e601f7a58ad902b4fa08f806079cb660b /src/Text/Hakyll/Render.hs
parent16f284d7471c5de1ae7a51521924199f6f5dc768 (diff)
downloadhakyll-d83791c106bf898e4397b592133642fbed5b8568.tar.gz
Pages should only contain ByteStrings.
Diffstat (limited to 'src/Text/Hakyll/Render.hs')
-rw-r--r--src/Text/Hakyll/Render.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Hakyll/Render.hs b/src/Text/Hakyll/Render.hs
index b9b57b7..8449180 100644
--- a/src/Text/Hakyll/Render.hs
+++ b/src/Text/Hakyll/Render.hs
@@ -32,7 +32,7 @@ render templatePath renderable = do
seq templateString $ hClose handle
context <- toContext renderable
let body = substitute templateString context
- return $ Page (M.insert "body" body $ M.mapKeys (B.unpack) context)
+ return $ fromContext (M.insert (B.pack "body") body context)
writePage :: Page -> IO ()
writePage page = do
@@ -53,7 +53,7 @@ renderChain :: Renderable a => [FilePath] -> a -> IO ()
renderChain templates renderable =
depends (getURL renderable) (getDependencies renderable ++ templates) $
do initialPage <- toContext renderable
- result <- foldM (flip render) (Page $ M.mapKeys B.unpack initialPage) templates
+ result <- foldM (flip render) (fromContext initialPage) templates
writePage result
static :: FilePath -> IO ()