diff options
author | Mekeor Melire <mekeor@ymail.com> | 2012-08-13 01:30:06 +0200 |
---|---|---|
committer | Mekeor Melire <mekeor@ymail.com> | 2012-08-13 01:30:06 +0200 |
commit | 0a8df1dabf15c02ebd3590ec04b8916e4e0fda7a (patch) | |
tree | 74076bd5a636a607e6f3c9f65b5a41aea2185e08 /src | |
parent | ca17e43628e1196701c65993480dffa650cb0916 (diff) | |
parent | eb3dd6c642002f5f61248df279c62423c3fc384f (diff) | |
download | hakyll-0a8df1dabf15c02ebd3590ec04b8916e4e0fda7a.tar.gz |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll/Web/Tags.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Hakyll/Web/Tags.hs b/src/Hakyll/Web/Tags.hs index 31b945f..42612a7 100644 --- a/src/Hakyll/Web/Tags.hs +++ b/src/Hakyll/Web/Tags.hs @@ -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 |