summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-10-27 09:42:12 +0800
committerrekado <rekado@elephly.net>2013-10-27 09:42:12 +0800
commit84cf755f9c4ace326c6f4641a8f014c2faefce56 (patch)
tree6c810fde9ac3d6b3136a35afb5bb7202e9818164
parentd898dc56d389a1ca7165c982599a0e594eb86539 (diff)
replace mappend with <>
-rw-r--r--site.hs20
1 files changed, 10 insertions, 10 deletions
diff --git a/site.hs b/site.hs
index e822518..3b9bfab 100644
--- a/site.hs
+++ b/site.hs
@@ -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