packages feed

hakyll 4.7.3.1 → 4.7.4.0

raw patch · 2 files changed

+14/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Hakyll.Web.Template.Context: getItemModificationTime :: Identifier -> Compiler UTCTime

Files

hakyll.cabal view
@@ -1,5 +1,5 @@ Name:    hakyll-Version: 4.7.3.1+Version: 4.7.4.0  Synopsis: A static website compiler library Description:
src/Hakyll/Web/Template/Context.hs view
@@ -21,6 +21,7 @@     , dateField     , dateFieldWith     , getItemUTC+    , getItemModificationTime     , modificationTimeField     , modificationTimeFieldWith     , teaserField@@ -296,6 +297,17 @@   --------------------------------------------------------------------------------+-- | Get the time on which the actual file was last modified. This only works if+-- there actually is an underlying file, of couse.+getItemModificationTime+    :: Identifier+    -> Compiler UTCTime+getItemModificationTime identifier = do+    provider <- compilerProvider <$> compilerAsk+    return $ resourceModificationTime provider identifier+++-------------------------------------------------------------------------------- modificationTimeField :: String     -- ^ Key                       -> String     -- ^ Format                       -> Context  a -- ^ Resuting context@@ -308,8 +320,7 @@                           -> String      -- ^ Format                           -> Context a   -- ^ Resulting context modificationTimeFieldWith locale key fmt = field key $ \i -> do-    provider <- compilerProvider <$> compilerAsk-    let mtime = resourceModificationTime provider $ itemIdentifier i+    mtime <- getItemModificationTime $ itemIdentifier i     return $ formatTime locale fmt mtime