summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web/Tags.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-01-26 11:15:14 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-01-26 11:15:14 +0100
commitd6fa74c54a8500d11e95e3d8822d47a56460a9da (patch)
treeaa4a56dd18f93feec9a8ddb1af6a8f41ccb7e320 /src/Hakyll/Web/Tags.hs
parentfa929d0c9bef4d683a525b9dfe5d3f8d5dcc1b0a (diff)
downloadhakyll-d6fa74c54a8500d11e95e3d8822d47a56460a9da.tar.gz
Export renderTags as well
Diffstat (limited to 'src/Hakyll/Web/Tags.hs')
-rw-r--r--src/Hakyll/Web/Tags.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Hakyll/Web/Tags.hs b/src/Hakyll/Web/Tags.hs
index edb21ed..fe99e3c 100644
--- a/src/Hakyll/Web/Tags.hs
+++ b/src/Hakyll/Web/Tags.hs
@@ -47,6 +47,7 @@ module Hakyll.Web.Tags
, buildTags
, buildCategories
, tagsRules
+ , renderTags
, renderTagCloud
, renderTagList
, tagsField
@@ -149,7 +150,7 @@ tagsRules tags rules =
--------------------------------------------------------------------------------
--- | Render tags in HTML
+-- | Render tags in HTML (the flexible higher-order function)
renderTags :: (String -> String -> Int -> Int -> Int -> String)
-- ^ Produce a tag item: tag, url, count, min count, max count
-> ([String] -> String)
@@ -218,13 +219,9 @@ renderTagList = renderTags makeLink (intercalate ", ")
--------------------------------------------------------------------------------
--- | Render tags with links with custom function to get tags. It is typically
--- together with 'getTags' like this:
---
--- > renderTagsFieldWith (customFunction . getTags)
--- > "tags" (fromCapture "tags/*")
+-- | Render tags with links with custom function to get tags
tagsFieldWith :: (Identifier -> Compiler [String]) -- ^ Get the tags
- -> String -- ^ Destination key
+ -> String -- ^ Destination field
-> Tags -- ^ Tags structure
-> Context a -- ^ Resulting context
tagsFieldWith getTags' key tags = field key $ \item -> do