diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-10-04 01:20:17 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-10-04 01:20:17 +0200 |
commit | 08c4d74a2fe9c667e725f2ebb41bc01006a703a1 (patch) | |
tree | 4134171be17ce36ca109b7fc72d574a5c2113308 /src/Text/Hakyll/Internal/Template.hs | |
parent | cd246971582639666bb1afe1b51bbd3db1ac744a (diff) | |
download | hakyll-08c4d74a2fe9c667e725f2ebb41bc01006a703a1.tar.gz |
Separate pandoc from page reading, general caching
Diffstat (limited to 'src/Text/Hakyll/Internal/Template.hs')
-rw-r--r-- | src/Text/Hakyll/Internal/Template.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Hakyll/Internal/Template.hs b/src/Text/Hakyll/Internal/Template.hs index 15a2c8c..9b9d9cf 100644 --- a/src/Text/Hakyll/Internal/Template.hs +++ b/src/Text/Hakyll/Internal/Template.hs @@ -7,6 +7,7 @@ module Text.Hakyll.Internal.Template , finalSubstitute ) where +import Control.Arrow ((>>>)) import Control.Applicative ((<$>)) import Data.List (isPrefixOf) import Data.Char (isAlphaNum) @@ -16,6 +17,8 @@ import qualified Data.Map as M import Text.Hakyll.Context (Context (..)) import Text.Hakyll.HakyllMonad (Hakyll) +import Text.Hakyll.HakyllAction +import Text.Hakyll.Pandoc import Text.Hakyll.Internal.Cache import Text.Hakyll.Internal.Page import Text.Hakyll.Internal.Template.Template @@ -53,7 +56,8 @@ readTemplate path = do where fileName = "templates" </> path readDefaultTemplate = do - page <- unContext <$> readPage path + page <- unContext <$> + runHakyllAction (readPageAction path >>> renderAction) let body = fromMaybe (error $ "No body in template " ++ fileName) (M.lookup "body" page) return $ fromString body |