summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-05-27 17:55:56 +0800
committerrekado <rekado@elephly.net>2013-05-27 17:55:56 +0800
commite0849bc17e463ad5e08b0bb4f3727bcdc68f10c4 (patch)
tree32c0dec88267a5b0aa11ef070b3db74e7618c914
parent35041c24660b2401d12494d2a7ef3607779f2ed0 (diff)
update to Hakyll 4.2
-rw-r--r--site.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/site.hs b/site.hs
index 0f897bd..a7fa086 100644
--- a/site.hs
+++ b/site.hs
@@ -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