@@ -47,6 +47,7 @@ module Hakyll.Web.Tags
47 , buildTags
47 , buildTags
48 , buildCategories
48 , buildCategories
49 , tagsRules
49 , tagsRules
50 , renderTagCloud
51 , renderTagCloud
51 , renderTagList
52 , renderTagList
52 , tagsField
53 , tagsField
@@ -149,7 +150,7 @@ tagsRules tags rules =
151--------------------------------------------------------------------------------
152--------------------------------------------------------------------------------
152−-- | Render tags in HTML
153+-- | Render tags in HTML (the flexible higher-order function)
153renderTags :: (String -> String -> Int -> Int -> Int -> String)
154renderTags :: (String -> String -> Int -> Int -> Int -> String)
154 -- ^ Produce a tag item: tag, url, count, min count, max count
155 -- ^ Produce a tag item: tag, url, count, min count, max count
155 -> ([String] -> String)
156 -> ([String] -> String)
@@ -218,13 +219,9 @@ renderTagList = renderTags makeLink (intercalate ", ")
220--------------------------------------------------------------------------------
221--------------------------------------------------------------------------------
221−-- | Render tags with links with custom function to get tags. It is typically
222+-- | Render tags with links with custom function to get tags
222−-- together with 'getTags' like this:
224−-- > renderTagsFieldWith (customFunction . getTags)
225−-- > "tags" (fromCapture "tags/*")
226tagsFieldWith :: (Identifier -> Compiler [String]) -- ^ Get the tags
223tagsFieldWith :: (Identifier -> Compiler [String]) -- ^ Get the tags
227− -> String -- ^ Destination key
224+ -> String -- ^ Destination field
228 -> Tags -- ^ Tags structure
225 -> Tags -- ^ Tags structure
229 -> Context a -- ^ Resulting context
226 -> Context a -- ^ Resulting context
230tagsFieldWith getTags' key tags = field key $ \item -> do
227tagsFieldWith getTags' key tags = field key $ \item -> do