Skip to content

Commit

Permalink
Minor corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne Eilermann committed Oct 28, 2010
1 parent 41565d2 commit b70f0f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rdoc
Expand Up @@ -19,7 +19,7 @@ And in your <tt>_config.yml</tt> you have to define your layout used to generate
tag_page_layout: tag_page
tag_page_dir: tag

Now you got a new filter called <tt>tag_cloud</tt> which you can use with the <tt>site</tt> object as argument in your layout to get a cloud of all your site's tags. The tags are linked to their related tag page. Furthermore, you got a <tt>tags</tt> filter which you can feed withe a <tt>post</tt> or a <tt>site</tt> object to get a link list of all it's tags.
Now you got a new filter called <tt>tag_cloud</tt> which you can use with the <tt>site</tt> object as argument in your layout to get a cloud of all your site's tags. The tags are linked to their related tag page. Furthermore, you got a <tt>tags</tt> filter which you can feed withe a <tt>post</tt> or a <tt>site</tt> object to get a link list of all its tags.

=== Example tag page layout

Expand Down
3 changes: 1 addition & 2 deletions lib/jekyll/tagging.rb
Expand Up @@ -88,8 +88,7 @@ def tag_url(tag, dir = Tagger::DEFAULT_TAG_PAGE_DIR)

def tags(obj)
tags = obj['tags'][0].is_a?(Array) ? obj['tags'].map{ |t| t[0]} : obj['tags']
tags.delete_if { |t| !t.is_a?(String) }
tags.map { |t| tag_link(t, tag_url(t)) }.join(', ')
tags.map { |t| tag_link(t, tag_url(t)) if t.is_a?(String) }.compact.join(', ')
end

end
Expand Down

0 comments on commit b70f0f9

Please sign in to comment.