class Zenweb::Page::YearlyPage
Generates a virtual page with yearly index pages. You must subclass and provide a content method.
Public Class Methods
Source
# File lib/zenweb/page.rb, line 670 def self.generate_all site, dir, pages pages.find_all(&:dated?).group_by { |page| page.date.year }.each do |year, subpages| path = "#{dir}/%4d/index.html.md.erb" % [year] self.new site, path, subpages, year end end
Source
# File lib/zenweb/page.rb, line 679 def initialize site, path, pages, year super site, path, pages self.date = Time.local(year) config.h['date'] = self.date end
Calls superclass method
Zenweb::Page::GeneratedIndex::new