@@ -40,12 +40,11 @@ writePage page = do
40 makeDirectories destination
40 makeDirectories destination
41 B.writeFile destination (getBody page)
41 B.writeFile destination (getBody page)
43−renderAndConcat :: FilePath -> [FilePath] -> IO B.ByteString
43+renderAndConcat :: Renderable a => FilePath -> [a] -> IO B.ByteString
44−renderAndConcat templatePath paths = foldM concatRender' B.empty paths
44+renderAndConcat templatePath renderables = foldM concatRender' B.empty renderables
45− where concatRender' :: B.ByteString -> FilePath -> IO B.ByteString
45+ where concatRender' :: Renderable a => B.ByteString -> a -> IO B.ByteString
46− concatRender' chunk path = do
46+ concatRender' chunk renderable = do
47− page <- readPage path
48− rendered <- render templatePath page
47+ rendered <- render templatePath renderable
49 let body = getBody rendered
48 let body = getBody rendered
50 return $ B.append chunk $ body
49 return $ B.append chunk $ body