class Zenweb::TagIndex
Public Class Methods
generate_all(site, dir, pages)
click to toggle source
# File lib/zenweb/page.rb, line 550 def self.generate_all site, dir, pages self.new site, "#{dir}/index.html.md.erb", pages end
tag_list(tag, pages)
click to toggle source
# File lib/zenweb/page.rb, line 554 def self.tag_list tag, pages r = [] r << "### #{tag}" r << "#{pages.size} pages" r << "" r << pages.map { |page| "* #{page.date.date} #{page_url page}" } r << "" r.join "\n" end
Public Instance Methods
index()
click to toggle source
# File lib/zenweb/page.rb, line 564 def index self.class.tags_for(pages).sort_by { |t,_| t.to_s.downcase }.map { |t, p| self.class.tag_list t, p }.join "\n" end