@@ -45,8 +45,8 @@ module Hakyll.Web.Template
4545 ( Template
4646 , applyTemplate
4747 , applySelf
48− , templateRead
49− , templateReadWith
48+ , templateCompiler
49+ , templateCompilerWith
5050 ) where
5151
5252import Control.Arrow
@@ -86,14 +86,15 @@ applySelf page = applyTemplate (readTemplate $ pageBody page) page
8686-- @.hml@ or @.hamlet@, it will be considered as a Hamlet template, and parsed
8787-- as such.
8888--
89−templateRead :: Compiler Resource Template
90−templateRead = templateReadWith defaultHamletSettings
89+templateCompiler :: Compiler Resource Template
90+templateCompiler = templateCompilerWith defaultHamletSettings
9191
92−-- | Version of 'templateRead' that enables custom settings.
92+-- | Version of 'templateCompiler' that enables custom settings.
9393--
94−templateReadWith :: HamletSettings -> Compiler Resource Template
95−templateReadWith settings =
96− getIdentifier &&& getResourceString >>^ uncurry read'
94+templateCompilerWith :: HamletSettings -> Compiler Resource Template
95+templateCompilerWith settings =
96+ cached "Hakyll.Web.Template.templateCompilerWith" $
97+ getIdentifier &&& getResourceString >>^ uncurry read'
9798 where
9899 read' identifier string =
99100 if takeExtension (toFilePath identifier) `elem` [".hml", ".hamlet"]