on master help sign in
applySelf -> applyAsTemplate
0896706Jasper Van der Jeugt
src/Hakyll/Web/Template.hs+5−5
@@ -41,7 +41,7 @@ module Hakyll.Web.Template
41 , templateCompiler
41 , templateCompiler
42 , applyTemplate
42 , applyTemplate
43 , requireApplyTemplate
43 , requireApplyTemplate
44− , applySelf
44+ , applyAsTemplate
45 , applyTemplateWith
45 , applyTemplateWith
46 ) where
46 ) where
47
47
@@ -103,10 +103,10 @@ requireApplyTemplate identifier context item = do
103-- | It is also possible that you want to substitute @$key$@s within the body of
103-- | It is also possible that you want to substitute @$key$@s within the body of
104-- an item. This function does that by interpreting the item body as a template,
104-- an item. This function does that by interpreting the item body as a template,
105-- and then applying it to itself.
105-- and then applying it to itself.
106−applySelf :: Context String -- ^ Context
106+applyAsTemplate :: Context String -- ^ Context
107− -> Item String -- ^ Item and template
107+ -> Item String -- ^ Item and template
108− -> Compiler (Item String) -- ^ Resulting item
108+ -> Compiler (Item String) -- ^ Resulting item
109−applySelf context item =
109+applyAsTemplate context item =
110 let tpl = readTemplate $ itemBody item
110 let tpl = readTemplate $ itemBody item
111 in applyTemplate tpl context item
111 in applyTemplate tpl context item
112
112