summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-11-20 22:00:16 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-11-20 22:00:16 +0100
commit815c265ac6135e524a4bec06f90e358b44acedd2 (patch)
tree9a7396bf997e52bf583c3f3c928faf8e2fe89449 /src/Hakyll/Web
parenta97b74b0d2f72722cd86619c01878acb01aa5167 (diff)
downloadhakyll-815c265ac6135e524a4bec06f90e358b44acedd2.tar.gz
Use list functionality for Feed
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r--src/Hakyll/Web/Feed.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Hakyll/Web/Feed.hs b/src/Hakyll/Web/Feed.hs
index 01ba0e1..da2fd5d 100644
--- a/src/Hakyll/Web/Feed.hs
+++ b/src/Hakyll/Web/Feed.hs
@@ -24,7 +24,7 @@ module Hakyll.Web.Feed
--------------------------------------------------------------------------------
-import Control.Monad (forM, (<=<))
+import Control.Monad ((<=<))
import Data.Monoid (mconcat)
@@ -34,6 +34,7 @@ import Hakyll.Core.Compiler.Internal
import Hakyll.Core.Item
import Hakyll.Web.Template
import Hakyll.Web.Template.Context
+import Hakyll.Web.Template.List
import Hakyll.Web.Template.Read
@@ -69,8 +70,7 @@ renderFeed feedPath itemPath config itemContext items = do
feedTpl <- compilerUnsafeIO $ loadTemplate feedPath
itemTpl <- compilerUnsafeIO $ loadTemplate itemPath
- items' <- forM items $ applyTemplate itemTpl itemContext'
- body <- makeItem $ concat $ map itemBody items'
+ body <- makeItem =<< applyTemplateList itemTpl itemContext' items
applyTemplate feedTpl feedContext body
where
-- Auxiliary: load a template from a datafile