Class: Jekyll::Archive
Instance Attribute Summary
Attributes inherited from Page
#content, #data, #ext, #output
Instance Method Summary collapse
-
#initialize(base, dir, type) ⇒ Archive
constructor
Initialize a new Archive.
Methods inherited from Page
Methods included from Convertible
#determine_content_type, #do_layout, #read_yaml, #to_s, #transform
Constructor Details
#initialize(base, dir, type) ⇒ Archive
Initialize a new Archive.
+base+ is the String path to the <source>
+dir+ is the String path between <source> and the file
Returns <Archive>
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jekyll/archive.rb', line 9 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 |