Class: Jekyll::IconPage

Inherits:
Page
  • Object
show all
Defined in:
lib/irontask/public/components/font-awesome/src/_plugins/icon_page_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(site, base, dir, icon) ⇒ IconPage

Take a single icon and render a page for it.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/irontask/public/components/font-awesome/src/_plugins/icon_page_generator.rb', line 14

def initialize(site, base, dir, icon)
  @site = site
  @base = base
  @dir = dir
  @name = "#{icon.id}.html"
  @icon = icon

  self.process(@name)

  self.read_yaml(File.join(base, site.config['layouts']), site.config['icon_layout'])

  self.data['icon'] = icon
  self.data['title'] = "icon-#{icon.id}: " + self.data['title_suffix']
end