summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/Render.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-02 14:34:50 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2009-12-02 14:34:50 +0100
commitf716440837521c192eeccdb95f210ff8b917db13 (patch)
tree8cb511db9575d2af5d5378143b2215628be5f0b3 /src/Text/Hakyll/Render.hs
parent36e4bf881b707948835bbae284ac444c80c67cc2 (diff)
downloadhakyll-f716440837521c192eeccdb95f210ff8b917db13.tar.gz
Better module definitions.
Diffstat (limited to 'src/Text/Hakyll/Render.hs')
-rw-r--r--src/Text/Hakyll/Render.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Text/Hakyll/Render.hs b/src/Text/Hakyll/Render.hs
index 3e17659..89e6a7c 100644
--- a/src/Text/Hakyll/Render.hs
+++ b/src/Text/Hakyll/Render.hs
@@ -1,4 +1,9 @@
-module Text.Hakyll.Render where
+module Text.Hakyll.Render
+ ( renderPage,
+ renderAndWrite,
+ static,
+ staticDirectory
+ ) where
import Text.Template
import qualified Data.ByteString.Lazy.Char8 as B
@@ -20,8 +25,8 @@ createContext = M.fromList . map packPair . M.toList
renderPage :: FilePath -> Page -> IO Page
renderPage templatePath page = do
- template <- B.readFile templatePath
- let body = substitute template (createContext page)
+ templateString <- B.readFile templatePath
+ let body = substitute templateString (createContext page)
return $ addContext "body" (B.unpack body) page
renderAndWrite :: FilePath -> Page -> IO ()