diff options
Diffstat (limited to 'site.hs')
-rw-r--r-- | site.hs | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1,7 +1,7 @@ -------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} import Control.Applicative ((<$>)) -import Data.Monoid (mappend) +import Data.Monoid ((<>)) import Hakyll import Data.Map as M import qualified Data.Set as S @@ -81,8 +81,8 @@ main = hakyllWith config $ do route idRoute compile $ do let archiveCtx = - constField "title" title `mappend` - field "posts" (\_ -> postList "posts/*.markdown" recentFirst) `mappend` + constField "title" title <> + field "posts" (\_ -> postList "posts/*.markdown" recentFirst) <> defaultContext makeItem "" @@ -106,8 +106,8 @@ main = hakyllWith config $ do route idRoute compile $ do - let ctx = constField "title" title `mappend` - field "posts" (\_ -> postList pattern recentFirst) `mappend` + let ctx = constField "title" title <> + field "posts" (\_ -> postList pattern recentFirst) <> defaultContext makeItem "" @@ -121,10 +121,10 @@ main = hakyllWith config $ do -------------------------------------------------------------------------------- postCtx :: Context String postCtx = - dateField "date" "%B %e, %Y" `mappend` - photoSnippet `mappend` - flattrSnippet `mappend` - licenseSnippet `mappend` + dateField "date" "%B %e, %Y" <> + photoSnippet <> + flattrSnippet <> + licenseSnippet <> defaultContext -- If a post declares a certain key in the metadata header, @@ -143,7 +143,7 @@ licenseSnippet = snippet "license-snippet" "license" "templates/license.html" postFeed renderer = do route idRoute compile $ do - let feedCtx = postCtx `mappend` bodyField "description" + let feedCtx = postCtx <> bodyField "description" posts <- fmap (take 10) . recentFirst =<< loadAllSnapshots "posts/*.markdown" "content" renderer myFeedConfiguration feedCtx posts |