Class: AlFolioCv::AssetsGenerator

Inherits:
Jekyll::Generator
  • Object
show all
Defined in:
lib/al_folio_cv.rb

Instance Method Summary collapse

Instance Method Details

#generate(site) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/al_folio_cv.rb', line 24

def generate(site)
  return unless AlFolioCv.enabled?(site)

  Dir.glob(File.join(ASSETS_ROOT, "**", "*")).sort.each do |source_path|
    next if File.directory?(source_path)

    relative_dir = File.dirname(source_path).sub("#{PLUGIN_ROOT}/", "")
    site.static_files << PluginStaticFile.new(site, PLUGIN_ROOT, relative_dir, File.basename(source_path))
  end
end