Class: Jekyll::Site

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#iconsObject (readonly)

Returns the value of attribute icons.



101
102
103
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 101

def icons
  @icons
end

Instance Method Details

#buildObject

After generation, runs a build of Font-Awesome



123
124
125
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 123

def build
  system("make build", :chdir => self.config['destination'], :out => :err)
end

#processObject



103
104
105
106
107
108
109
110
111
112
113
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 103

def process
  self.reset_icons
  self.reset
  self.read
  self.generate
  self.render
  self.cleanup
  self.write

  self.build
end

#reset_iconsObject

Reads the YAML file that stores all data about icons



117
118
119
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 117

def reset_icons
  @icons = IconList.new(YAML.load_file(self.config['icon_meta'])['icons'])
end

#site_payloadObject



127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 127

def site_payload
  {
    "site"       => self.config.merge({
      "time"       => self.time,
      "posts"      => self.posts.sort { |a, b| b <=> a },
      "pages"      => self.pages,
      "html_pages" => self.pages.reject { |page| !page.html? },
      "categories" => post_attr_hash('categories'),
      "tags"       => post_attr_hash('tags')}),
    "icons"      => @icons,
  }
end