diff options
Diffstat (limited to 'lib/Hakyll/Web')
-rw-r--r-- | lib/Hakyll/Web/Template/Context.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Hakyll/Web/Template/Context.hs b/lib/Hakyll/Web/Template/Context.hs index dae241c..0d71386 100644 --- a/lib/Hakyll/Web/Template/Context.hs +++ b/lib/Hakyll/Web/Template/Context.hs @@ -50,7 +50,7 @@ import Hakyll.Core.Metadata import Hakyll.Core.Provider import Hakyll.Core.Util.String (needlePrefix, splitAll) import Hakyll.Web.Html -import System.FilePath (splitDirectories, takeBaseName) +import System.FilePath (splitDirectories, takeBaseName, dropExtension) -------------------------------------------------------------------------------- @@ -300,7 +300,7 @@ getItemUTC :: MonadMetadata m getItemUTC locale id' = do metadata <- getMetadata id' let tryField k fmt = lookupString k metadata >>= parseTime' fmt - paths = splitDirectories $ toFilePath id' + paths = splitDirectories $ (dropExtension . toFilePath) id' maybe empty' return $ msum $ [tryField "published" fmt | fmt <- formats] ++ |