@@ -159,14 +159,16 @@ post lists for every tag.
159Hakyll provides a function called `readTagMap`. Let's inspect it's type.
159Hakyll provides a function called `readTagMap`. Let's inspect it's type.
161~~~~~{.haskell}
161~~~~~{.haskell}
162−readTagMap [FilePath] -> Hakyll Map String [FilePath]
162+readTagMap String [FilePath] -> Hakyll Map String [FilePath]
165You give it a list of paths, and it creates a map that, for every tag, holds
165You give it a list of paths, and it creates a map that, for every tag, holds
166a number of posts. We can easily use this to render a post list for every tag.
166a number of posts. We can easily use this to render a post list for every tag.
167+The first argument given is an "identifier", unique to this tag map. Hakyll
168+needs this so it can cache the tags.
168~~~~~{.haskell}
170~~~~~{.haskell}
169−tagMap <- readTagMap postPaths
171+tagMap <- readTagMap "postTags" postPaths
170let renderListForTag (tag, posts) =
172let renderListForTag (tag, posts) =
171 renderPostList (tagToURL tag)
173 renderPostList (tagToURL tag)
172 ("Posts tagged " ++ tag)
174 ("Posts tagged " ++ tag)
@@ -181,11 +183,11 @@ A tag cloud is a commonly found thing on blogs. Hakyll also provides code to
181generate a tag cloud. Let's have a look at the `renderTagCloud` function.
183generate a tag cloud. Let's have a look at the `renderTagCloud` function.
183~~~~~{.haskell}
185~~~~~{.haskell}
184−TagCloud :: M.Map String [FilePath]
186+renderTagCloud :: M.Map String [FilePath]
185− -> (String -> String)
187+ -> (String -> String)
186− -> Float
188+ -> Float
187− -> Float
189+ -> Float
188− -> String
190+ -> String
191The first argument is obviously the result of the `readTagMap` function. The
193The first argument is obviously the result of the `readTagMap` function. The