@@ -28,12 +28,14 @@
2828{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, Arrows #-}
2929module Hakyll.Web.Tags
3030 ( Tags (..)
31+ , getTags
3132 , readTagsWith
3233 , readTags
3334 , readCategory
3435 , renderTagCloud
3536 , renderTagList
3637 , renderTagsField
38+ , renderTagsFieldWith
3739 , renderCategoryField
3840 , sortTagsBy
3941 , caseInsensitiveTags
@@ -176,7 +178,12 @@ renderTagList makeUrl = renderTags makeUrl makeLink (intercalate ", ")
176178 makeLink tag url count _ _ = renderHtml $
177179 H.a ! A.href (toValue url) $ toHtml (tag ++ " (" ++ show count ++ ")")
178180
179−-- | Render tags with links
181+-- | Render tags with links with custom function to get tags. It is typically
182+-- together with 'getTags' like this:
183+--
184+-- @
185+-- 'renderTagsFieldWith' (customFunction . 'getTags') \"tags\" ('fromCapture' \"tags/*\")
186+-- @
180187--
181188renderTagsFieldWith :: (Page a -> [String]) -- ^ Function to get the tags
182189 -> String -- ^ Destination key