Class: Jekyll::DataPage
- Inherits:
-
Page
- Object
- Page
- Jekyll::DataPage
- Defined in:
- jekyll/_plugins/data_page_generator.rb
Instance Method Summary collapse
-
#initialize(site, base, dir, data, name, template, extension) ⇒ DataPage
constructor
A new instance of DataPage.
Constructor Details
#initialize(site, base, dir, data, name, template, extension) ⇒ DataPage
Returns a new instance of DataPage.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'jekyll/_plugins/data_page_generator.rb', line 10 def initialize(site, base, dir, data, name, template, extension) @site = site @base = base @dir = dir @name = sanitize_filename(data[name]).to_s + "." + extension.to_s self.process(@name) self.read_yaml(File.join(base, '_layouts'), template + ".md") self.data.merge!(data) self.data['title'] = data[name] unless self.data.has_key?('title') end |