module Jekyll class Archive < Page # Initialize a new Archive. # +base+ is the String path to the # +dir+ is the String path between and the file # # Returns def initialize(base, dir, type) @base = base @dir = dir @name = 'index.html' self.process(@name) self.read_yaml(File.join(base, '_layouts'), type + '.html') year, month, day = dir.split('/') self.data['year'] = year.to_i month and self.data['month'] = month.to_i day and self.data['day'] = day.to_i end end end