diff options
Diffstat (limited to 'site.hs')
-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 |