on master help sign in
Small consistency changes
commiteb3dd6c642002f5f61248df279c62423c3fc384f authorJasper Van der Jeugt <m@jaspervdj.be> dateSun 12 Aug 2012, 03:48 (14 years ago) parent5bbbfca
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