class Jekyll::TagGenerator

Public Instance Methods

generate(site) click to toggle source
# File _plugins/_tag_gen.rb, line 18
def generate(site)
  if site.layouts.key? 'tag_index'
    dir = site.config['tag_dir'] || 'tag'
    site.tags.keys.each do |tag|
      write_tag_index(site, File.join(dir, tag), tag)
    end
  end
end
write_tag_index(site, dir, tag) click to toggle source
# File _plugins/_tag_gen.rb, line 26
def write_tag_index(site, dir, tag)
  index = TagIndex.new(site, site.source, dir, tag)
  index.render(site.layouts, site.site_payload)
  index.write(site.dest)
  site.pages << index
end