on master help sign in
Export renderTags as well
d6fa74cJasper Van der Jeugt
hakyll.cabal+1−1
@@ -1,5 +1,5 @@
1Name: hakyll
1Name: hakyll
2−Version: 4.1.3.0
2+Version: 4.1.4.0
3
3
4Synopsis: A static website compiler library
4Synopsis: A static website compiler library
5Description:
5Description:
src/Hakyll/Web/Tags.hs+4−7
@@ -47,6 +47,7 @@ module Hakyll.Web.Tags
47 , buildTags
47 , buildTags
48 , buildCategories
48 , buildCategories
49 , tagsRules
49 , tagsRules
50+ , renderTags
50 , renderTagCloud
51 , renderTagCloud
51 , renderTagList
52 , renderTagList
52 , tagsField
53 , tagsField
@@ -149,7 +150,7 @@ tagsRules tags rules =
149
150
150
151
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 ", ")
218
219
219
220
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:
223−--
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
web/releases.markdown+6
@@ -4,6 +4,12 @@ title: Releases
4
4
5# Releases
5# Releases
6
6
7+## Hakyll 4.1.4.0
8+
9+*January 26, 2013*
10+
11+- Export the flexible `renderTags` function
12+
7## Hakyll 4.1.3.0
13## Hakyll 4.1.3.0
8
14
9*January 26, 2013*
15*January 26, 2013*