summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-03-07 11:18:34 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-03-07 11:18:34 +0100
commita48b53c385192dd21e4a49269206cdd5cdc45757 (patch)
treec9a4085233548606d3a5ffede6e11d48f4bd32bf /src/Hakyll/Web
parentbe7a5e6afdc983ae2956fafb5c69afd0ebfe2cfe (diff)
downloadhakyll-a48b53c385192dd21e4a49269206cdd5cdc45757.tar.gz
Add utility getMetadataField
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r--src/Hakyll/Web/Template/Context.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs
index 1a9aba3..f9c96d0 100644
--- a/src/Hakyll/Web/Template/Context.hs
+++ b/src/Hakyll/Web/Template/Context.hs
@@ -100,8 +100,8 @@ bodyField key = field key $ return . itemBody
-- | Map any field to its metadata value, if present
metadataField :: Context String
metadataField = Context $ \k i -> do
- metadata <- getMetadata $ itemIdentifier i
- maybe empty return $ M.lookup k metadata
+ value <- getMetadataField (itemIdentifier i) k
+ maybe empty return value
--------------------------------------------------------------------------------