diff options
author | Eric Stolten <stoltene2@gmail.com> | 2013-08-20 22:03:04 -0400 |
---|---|---|
committer | Eric Stolten <stoltene2@gmail.com> | 2013-08-20 22:03:04 -0400 |
commit | fbc43b3a04583a3c23e30cb3382f32faacb39a4d (patch) | |
tree | a3fd214c0cdb7e7fa552b81284f667a4b2493043 | |
parent | f14f52040a5377dbca229ab34674542148a4868b (diff) | |
parent | 5679681ac15de8b3b7d1cc0db6745f6787141e23 (diff) | |
download | hakyll-fbc43b3a04583a3c23e30cb3382f32faacb39a4d.tar.gz |
Merge branch 'upstream-master'
-rw-r--r-- | src/Hakyll/Core/Provider/Internal.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Provider/Metadata.hs | 5 | ||||
-rw-r--r-- | src/Hakyll/Core/Store.hs | 5 | ||||
-rw-r--r-- | src/Hakyll/Web/Template/Context.hs | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/src/Hakyll/Core/Provider/Internal.hs b/src/Hakyll/Core/Provider/Internal.hs index 583c665..d566f3a 100644 --- a/src/Hakyll/Core/Provider/Internal.hs +++ b/src/Hakyll/Core/Provider/Internal.hs @@ -98,7 +98,7 @@ data Provider = Provider providerOldFiles :: Map Identifier ResourceInfo , -- | Underlying persistent store for caching providerStore :: Store - } + } deriving (Show) -------------------------------------------------------------------------------- diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs index fe2857a..7e4d7ed 100644 --- a/src/Hakyll/Core/Provider/Metadata.hs +++ b/src/Hakyll/Core/Provider/Metadata.hs @@ -44,8 +44,9 @@ loadMetadata p identifier = do return (M.union md emd, body) where - fp = resourceFilePath p identifier - mi = M.lookup identifier (providerFiles p) >>= resourceInfoMetadata + normal = setVersion Nothing identifier + fp = resourceFilePath p identifier + mi = M.lookup normal (providerFiles p) >>= resourceInfoMetadata -------------------------------------------------------------------------------- diff --git a/src/Hakyll/Core/Store.hs b/src/Hakyll/Core/Store.hs index 74d9d2f..5c3667d 100644 --- a/src/Hakyll/Core/Store.hs +++ b/src/Hakyll/Core/Store.hs @@ -50,6 +50,11 @@ data Store = Store -------------------------------------------------------------------------------- +instance Show Store where + show _ = "<Store>" + + +-------------------------------------------------------------------------------- -- | Result of a store query data Result a = Found a -- ^ Found, result diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs index 98662dd..cd52eb0 100644 --- a/src/Hakyll/Web/Template/Context.hs +++ b/src/Hakyll/Web/Template/Context.hs @@ -130,7 +130,7 @@ bodyField key = field key $ return . itemBody -------------------------------------------------------------------------------- -- | Map any field to its metadata value, if present -metadataField :: Context String +metadataField :: Context a metadataField = Context $ \k i -> do value <- getMetadataField (itemIdentifier i) k maybe empty (return . StringField) value |