on master help sign in
Update tagblog example
b90cfaeJasper Van der Jeugt
examples/tagblog/hakyll.hs+2−3
@@ -4,7 +4,6 @@ module Main where
4import Prelude hiding (id)
4import Prelude hiding (id)
5import Control.Arrow ((>>>), (***), arr)
5import Control.Arrow ((>>>), (***), arr)
6import Control.Category (id)
6import Control.Category (id)
7−import qualified Data.Map as M
8import Data.Monoid (mempty, mconcat)
7import Data.Monoid (mempty, mconcat)
9
8
10import Hakyll
9import Hakyll
@@ -21,7 +20,7 @@ main = hakyll $ do
21 route $ setExtension ".html"
20 route $ setExtension ".html"
22 compile $ pageCompiler
21 compile $ pageCompiler
23 >>> arr (renderDateField "date" "%B %e, %Y" "Date unknown")
22 >>> arr (renderDateField "date" "%B %e, %Y" "Date unknown")
24− >>> renderTagsField "prettytags" (fromCaptureString "tags/*")
23+ >>> renderTagsField "prettytags" (fromCapture "tags/*")
25 >>> applyTemplateCompiler "templates/post.html"
24 >>> applyTemplateCompiler "templates/post.html"
26 >>> applyTemplateCompiler "templates/default.html"
25 >>> applyTemplateCompiler "templates/default.html"
27 >>> relativizeUrlsCompiler
26 >>> relativizeUrlsCompiler
@@ -69,7 +68,7 @@ main = hakyll $ do
69 renderTagCloud' = renderTagCloud tagIdentifier 100 120
68 renderTagCloud' = renderTagCloud tagIdentifier 100 120
70
69
71 tagIdentifier :: String -> Identifier
70 tagIdentifier :: String -> Identifier
72− tagIdentifier = fromCaptureString "tags/*"
71+ tagIdentifier = fromCapture "tags/*"
73
72
74-- | Auxiliary compiler: generate a post list from a list of given posts, and
73-- | Auxiliary compiler: generate a post list from a list of given posts, and
75-- add it to the current page under @$posts@
74-- add it to the current page under @$posts@