on master help sign in
Merge remote-tracking branch 'upstream/master'
commit0a8df1dabf15c02ebd3590ec04b8916e4e0fda7a authorMekeor Melire <mekeor@ymail.com> dateMon 13 Aug 2012, 01:30 (14 years ago) parentca17e43eb3dd6c
1 file changed+4−4
src/Hakyll/Web/Tags.hs+4−4
src/Hakyll/Web/Tags.hs+4−4
@@ -80,7 +80,8 @@ instance Binary a => Binary (Tags a) where
8080instance Writable (Tags a) where
8181 write _ _ = return ()
8282
83−-- | Obtain tags from a page
83+-- | Obtain tags from a page in the default way: parse them from the @tags@
84+-- metadata field.
8485--
8586getTags :: Page a -> [String]
8687getTags = map trim . splitAll "," . getField "tags"
@@ -181,9 +182,8 @@ renderTagList makeUrl = renderTags makeUrl makeLink (intercalate ", ")
181182-- | Render tags with links with custom function to get tags. It is typically
182183-- together with 'getTags' like this:
183184--
184−-- @
185−-- 'renderTagsFieldWith' (customFunction . 'getTags') \"tags\" ('fromCapture' \"tags/*\")
186−-- @
185+-- > renderTagsFieldWith (customFunction . getTags)
186+-- > "tags" (fromCapture "tags/*")
187187--
188188renderTagsFieldWith :: (Page a -> [String]) -- ^ Function to get the tags
189189 -> String -- ^ Destination key