module Jekyll::TaggingFilters
Public Instance Methods
active_tag_data(site = Tagger.site)
click to toggle source
# File lib/jekyll/tagging.rb 151 def active_tag_data(site = Tagger.site) 152 return site.config['tag_data'] unless site.config["ignored_tags"] 153 site.config["tag_data"].reject { |tag, set| site.config["ignored_tags"].include? tag } 154 end
keywords(obj)
click to toggle source
# File lib/jekyll/tagging.rb 145 def keywords(obj) 146 return '' if not obj['tags'] 147 tags = obj['tags'].dup 148 tags.join(',') 149 end
tag_cloud(site)
click to toggle source
# File lib/jekyll/tagging.rb 122 def tag_cloud(site) 123 active_tag_data.map { |tag, set| 124 tag_link(tag, tag_url(tag), :class => "set-#{set}") 125 }.join(' ') 126 end
tag_link(tag, url = tag_url(tag), html_opts = nil)
click to toggle source
# File lib/jekyll/tagging.rb 128 def tag_link(tag, url = tag_url(tag), html_opts = nil) 129 html_opts &&= ' ' << html_opts.map { |k, v| %Q{#{k}="#{v}"} }.join(' ') 130 %Q{<a href="#{url}"#{html_opts}>#{tag}</a>} 131 end
tag_url(tag, type = :page, site = Tagger.site)
click to toggle source
# File lib/jekyll/tagging.rb 133 def tag_url(tag, type = :page, site = Tagger.site) 134 url = File.join('', site.config["baseurl"].to_s, site.config["tag_#{type}_dir"], ERB::Util.u(jekyll_tagging_slug(tag))) 135 site.permalink_style == :pretty || site.config['tag_permalink_style'] == 'pretty' ? url << '/' : url << '.html' 136 end