on master help sign in
Export renderTags as well
commitd6fa74c54a8500d11e95e3d8822d47a56460a9da authorJasper Van der Jeugt <m@jaspervdj.be> dateSat 26 Jan 2013, 11:15 (14 years ago) parentfa929d0
3 files changed+11−8
hakyll.cabal+1−1 src/Hakyll/Web/Tags.hs+4−7 web/releases.markdown+6
hakyll.cabal+1−1
@@ -1,5 +1,5 @@
11Name: hakyll
2−Version: 4.1.3.0
2+Version: 4.1.4.0
33
44Synopsis: A static website compiler library
55Description:
src/Hakyll/Web/Tags.hs+4−7
@@ -47,6 +47,7 @@ module Hakyll.Web.Tags
4747 , buildTags
4848 , buildCategories
4949 , tagsRules
50+ , renderTags
5051 , renderTagCloud
5152 , renderTagList
5253 , tagsField
@@ -149,7 +150,7 @@ tagsRules tags rules =
149150
150151
151152--------------------------------------------------------------------------------
152−-- | Render tags in HTML
153+-- | Render tags in HTML (the flexible higher-order function)
153154renderTags :: (String -> String -> Int -> Int -> Int -> String)
154155 -- ^ Produce a tag item: tag, url, count, min count, max count
155156 -> ([String] -> String)
@@ -218,13 +219,9 @@ renderTagList = renderTags makeLink (intercalate ", ")
218219
219220
220221--------------------------------------------------------------------------------
221−-- | Render tags with links with custom function to get tags. It is typically
222−-- together with 'getTags' like this:
223−--
224−-- > renderTagsFieldWith (customFunction . getTags)
225−-- > "tags" (fromCapture "tags/*")
222+-- | Render tags with links with custom function to get tags
226223tagsFieldWith :: (Identifier -> Compiler [String]) -- ^ Get the tags
227− -> String -- ^ Destination key
224+ -> String -- ^ Destination field
228225 -> Tags -- ^ Tags structure
229226 -> Context a -- ^ Resulting context
230227tagsFieldWith getTags' key tags = field key $ \item -> do
web/releases.markdown+6
@@ -4,6 +4,12 @@ title: Releases
44
55# Releases
66
7+## Hakyll 4.1.4.0
8+
9+*January 26, 2013*
10+
11+- Export the flexible `renderTags` function
12+
713## Hakyll 4.1.3.0
814
915*January 26, 2013*