summaryrefslogtreecommitdiff
path: root/site.hs
diff options
context:
space:
mode:
Diffstat (limited to 'site.hs')
-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