Sha256: 1782695d94db2d4bcf8735f22a6149e191fd02adae88c9d319f19bc24ce1c3a8
Contents?: true
Size: 592 Bytes
Versions: 5
Compression:
Stored size: 592 Bytes
Contents
module Jekyll class Archive < Page # Initialize a new Archive. # +base+ is the String path to the <source> # +dir+ is the String path between <source> and the file # # Returns <Archive> 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
Version data entries
5 entries across 5 versions & 1 rubygems