@@ -45,8 +45,8 @@ module Hakyll.Web.Template
45 ( Template
45 ( Template
46 , applyTemplate
46 , applyTemplate
47 , applySelf
47 , applySelf
48− , templateRead
48+ , templateCompiler
49− , templateReadWith
49+ , templateCompilerWith
52import Control.Arrow
52import Control.Arrow
@@ -86,14 +86,15 @@ applySelf page = applyTemplate (readTemplate $ pageBody page) page
86-- @.hml@ or @.hamlet@, it will be considered as a Hamlet template, and parsed
86-- @.hml@ or @.hamlet@, it will be considered as a Hamlet template, and parsed
87-- as such.
87-- as such.
89−templateRead :: Compiler Resource Template
89+templateCompiler :: Compiler Resource Template
90−templateRead = templateReadWith defaultHamletSettings
90+templateCompiler = templateCompilerWith defaultHamletSettings
92−-- | Version of 'templateRead' that enables custom settings.
92+-- | Version of 'templateCompiler' that enables custom settings.
94−templateReadWith :: HamletSettings -> Compiler Resource Template
94+templateCompilerWith :: HamletSettings -> Compiler Resource Template
95−templateReadWith settings =
95+templateCompilerWith settings =
96+ cached "Hakyll.Web.Template.templateCompilerWith" $
96− getIdentifier &&& getResourceString >>^ uncurry read'
97+ getIdentifier &&& getResourceString >>^ uncurry read'
98 read' identifier string =
99 read' identifier string =
99 if takeExtension (toFilePath identifier) `elem` [".hml", ".hamlet"]
100 if takeExtension (toFilePath identifier) `elem` [".hml", ".hamlet"]