diff options
author | rekado <rekado@elephly.net> | 2013-05-27 17:55:56 +0800 |
---|---|---|
committer | rekado <rekado@elephly.net> | 2013-05-27 17:55:56 +0800 |
commit | e0849bc17e463ad5e08b0bb4f3727bcdc68f10c4 (patch) | |
tree | 32c0dec88267a5b0aa11ef070b3db74e7618c914 | |
parent | 35041c24660b2401d12494d2a7ef3607779f2ed0 (diff) |
update to Hakyll 4.2
-rw-r--r-- | site.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -77,7 +77,7 @@ main = hakyllWith config $ do create ["index.html"] $ do route idRoute compile $ do - mostRecent <- (head . recentFirst) <$> loadAllSnapshots "posts/*.markdown" "non-relative" + mostRecent <- fmap head . recentFirst =<< loadAllSnapshots "posts/*.markdown" "non-relative" makeItem (itemBody mostRecent) >>= relativizeUrls match "templates/*" $ compile templateCompiler @@ -119,9 +119,9 @@ licenseSnippet = field "license-snippet" $ \item -> do -------------------------------------------------------------------------------- -postList :: ([Item String] -> [Item String]) -> Compiler String +postList :: ([Item String] -> Compiler [Item String]) -> Compiler String postList sortFilter = do - posts <- sortFilter <$> loadAll ("posts/*.markdown" .&&. hasNoVersion) + posts <- sortFilter =<< loadAll ("posts/*.markdown" .&&. hasNoVersion) itemTpl <- loadBody "templates/post-item.html" list <- applyTemplateList itemTpl postCtx posts return list |