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