summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Provider/Metadata.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll/Core/Provider/Metadata.hs')
-rw-r--r--src/Hakyll/Core/Provider/Metadata.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs
index 52c07cb..276483b 100644
--- a/src/Hakyll/Core/Provider/Metadata.hs
+++ b/src/Hakyll/Core/Provider/Metadata.hs
@@ -31,13 +31,14 @@ loadMetadata p identifier = do
then second Just <$> loadMetadataHeader fp
else return (M.empty, Nothing)
- emd <- if resourceExists p mi then loadMetadataFile mfp else return M.empty
+ emd <- case mi of
+ Nothing -> return M.empty
+ Just mi' -> loadMetadataFile $ resourceFilePath p mi'
return (M.union md emd, body)
where
fp = resourceFilePath p identifier
- mi = resourceMetadataResource identifier
- mfp = resourceFilePath p mi
+ mi = M.lookup identifier (providerFiles p) >>= resourceInfoMetadata
--------------------------------------------------------------------------------