diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-13 19:47:19 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-13 19:47:19 +0100 |
commit | 089670629bc0f84c74fef520772caec842d2a549 (patch) | |
tree | 3d25c2a8eabe2087d70f71e7d9579907f28a6e13 /src | |
parent | 33fdc412ce8c8276aa620b87faa130b4bbb18267 (diff) | |
download | hakyll-089670629bc0f84c74fef520772caec842d2a549.tar.gz |
applySelf -> applyAsTemplate
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll/Web/Template.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Hakyll/Web/Template.hs b/src/Hakyll/Web/Template.hs index 3eaae6b..b793652 100644 --- a/src/Hakyll/Web/Template.hs +++ b/src/Hakyll/Web/Template.hs @@ -41,7 +41,7 @@ module Hakyll.Web.Template , templateCompiler , applyTemplate , requireApplyTemplate - , applySelf + , applyAsTemplate , applyTemplateWith ) where @@ -103,10 +103,10 @@ requireApplyTemplate identifier context item = do -- | It is also possible that you want to substitute @$key$@s within the body of -- an item. This function does that by interpreting the item body as a template, -- and then applying it to itself. -applySelf :: Context String -- ^ Context - -> Item String -- ^ Item and template - -> Compiler (Item String) -- ^ Resulting item -applySelf context item = +applyAsTemplate :: Context String -- ^ Context + -> Item String -- ^ Item and template + -> Compiler (Item String) -- ^ Resulting item +applyAsTemplate context item = let tpl = readTemplate $ itemBody item in applyTemplate tpl context item |