plugins/tag_generator.rb
def tag_links(tags)
      dir = @context.registers[:site].config['tag_dir'] || 'tags'
      tags = tags.sort!.map do |item|
        "<a class='tag' href='/#{dir}/#{item.to_url}/'>#{item}</a>"
      end

      case tags.length
      when 0
        ""
      when 1
        tags[0].to_s
      else
        "#{tags[0...-1].join(', ')}, #{tags[-1]}"
      end
    end
# Outputs a list of tags as comma-separated <a> links. This is used
# to output the tag list for each post on a tag page.
#
#  +tags+ is the list of tags to format.
#
# Returns string
#
Outputs a list of tags as comma-separated  links. This is used
to output the tag list for each post on a tag page.

+tags+ is the list of tags to format.

Returns string
Outputs a list of tags as comma - separated links . This is used to output the tag list for each post on a tag page . + tags + is the list of tags to format . Returns string
def tag_links(tags)
      dir = @context.registers[:site].config['tag_dir'] || 'tags'
      tags = tags.sort!.map do |item|
        "<a class='tag' href='/#{dir}/#{item.to_url}/'>#{item}</a>"
      end
      case tags.length
      when 0
        ""
      when 1
        tags[0].to_s
      else
        "#{tags[0...-1].join(', ')}, #{tags[-1]}"
      end
    end
def tag_links ( tags ) dir = @context . registers [ :site ] . config [ 'tag_dir' ] || 'tags' tags = tags . sort! . map do | item | "<a class='tag' href='/#{dir}/#{item.to_url}/'>#{item}</a>" end case tags . length when 0 "" when 1 tags [ 0 ] . to_s else "#{tags[0...-1].join(', ')}, #{tags[-1]}" end end
Outputs a list of tags as comma-separated <a> links.
Outputs a list of tags as comma - separated <a > links .
tags