commit
5bbbfca091
1 changed files with 8 additions and 1 deletions
|
@ -28,12 +28,14 @@
|
||||||
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, Arrows #-}
|
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, Arrows #-}
|
||||||
module Hakyll.Web.Tags
|
module Hakyll.Web.Tags
|
||||||
( Tags (..)
|
( Tags (..)
|
||||||
|
, getTags
|
||||||
, readTagsWith
|
, readTagsWith
|
||||||
, readTags
|
, readTags
|
||||||
, readCategory
|
, readCategory
|
||||||
, renderTagCloud
|
, renderTagCloud
|
||||||
, renderTagList
|
, renderTagList
|
||||||
, renderTagsField
|
, renderTagsField
|
||||||
|
, renderTagsFieldWith
|
||||||
, renderCategoryField
|
, renderCategoryField
|
||||||
, sortTagsBy
|
, sortTagsBy
|
||||||
, caseInsensitiveTags
|
, caseInsensitiveTags
|
||||||
|
@ -176,7 +178,12 @@ renderTagList makeUrl = renderTags makeUrl makeLink (intercalate ", ")
|
||||||
makeLink tag url count _ _ = renderHtml $
|
makeLink tag url count _ _ = renderHtml $
|
||||||
H.a ! A.href (toValue url) $ toHtml (tag ++ " (" ++ show count ++ ")")
|
H.a ! A.href (toValue url) $ toHtml (tag ++ " (" ++ show count ++ ")")
|
||||||
|
|
||||||
-- | Render tags with links
|
-- | Render tags with links with custom function to get tags. It is typically
|
||||||
|
-- together with 'getTags' like this:
|
||||||
|
--
|
||||||
|
-- @
|
||||||
|
-- 'renderTagsFieldWith' (customFunction . 'getTags') \"tags\" ('fromCapture' \"tags/*\")
|
||||||
|
-- @
|
||||||
--
|
--
|
||||||
renderTagsFieldWith :: (Page a -> [String]) -- ^ Function to get the tags
|
renderTagsFieldWith :: (Page a -> [String]) -- ^ Function to get the tags
|
||||||
-> String -- ^ Destination key
|
-> String -- ^ Destination key
|
||||||
|
|
Loading…
Reference in a new issue