diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-26 11:15:14 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-01-26 11:15:14 +0100 |
commit | d6fa74c54a8500d11e95e3d8822d47a56460a9da (patch) | |
tree | aa4a56dd18f93feec9a8ddb1af6a8f41ccb7e320 | |
parent | fa929d0c9bef4d683a525b9dfe5d3f8d5dcc1b0a (diff) | |
download | hakyll-d6fa74c54a8500d11e95e3d8822d47a56460a9da.tar.gz |
Export renderTags as well
-rw-r--r-- | hakyll.cabal | 2 | ||||
-rw-r--r-- | src/Hakyll/Web/Tags.hs | 11 | ||||
-rw-r--r-- | web/releases.markdown | 6 |
3 files changed, 11 insertions, 8 deletions
diff --git a/hakyll.cabal b/hakyll.cabal index a3a75cd..2d0a47d 100644 --- a/hakyll.cabal +++ b/hakyll.cabal @@ -1,5 +1,5 @@ Name: hakyll -Version: 4.1.3.0 +Version: 4.1.4.0 Synopsis: A static website compiler library Description: 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 diff --git a/web/releases.markdown b/web/releases.markdown index ab77c62..f771070 100644 --- a/web/releases.markdown +++ b/web/releases.markdown @@ -4,6 +4,12 @@ title: Releases # Releases +## Hakyll 4.1.4.0 + +*January 26, 2013* + +- Export the flexible `renderTags` function + ## Hakyll 4.1.3.0 *January 26, 2013* |