Permalink
Browse files

Small consistency changes

  • Loading branch information...
1 parent 5bbbfca commit eb3dd6c642002f5f61248df279c62423c3fc384f @jaspervdj committed Aug 12, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Hakyll/Web/Tags.hs
View
@@ -80,7 +80,8 @@ instance Binary a => Binary (Tags a) where
instance Writable (Tags a) where
write _ _ = return ()
--- | Obtain tags from a page
+-- | Obtain tags from a page in the default way: parse them from the @tags@
+-- metadata field.
--
getTags :: Page a -> [String]
getTags = map trim . splitAll "," . getField "tags"
@@ -181,9 +182,8 @@ renderTagList makeUrl = renderTags makeUrl 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/*\")
--- @
+-- > renderTagsFieldWith (customFunction . getTags)
+-- > "tags" (fromCapture "tags/*")
--
renderTagsFieldWith :: (Page a -> [String]) -- ^ Function to get the tags
-> String -- ^ Destination key

0 comments on commit eb3dd6c

Please sign in to comment.