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