Class: AlEmailProtect::AssetsGenerator
- Inherits:
-
Jekyll::Generator
- Object
- Jekyll::Generator
- AlEmailProtect::AssetsGenerator
- Defined in:
- lib/al_email_protect.rb
Overview
Copies the runtime into the built site. Skipped entirely when the feature is off, so a site that never enables it does not carry the asset.
Instance Method Summary collapse
Instance Method Details
#generate(site) ⇒ Object
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/al_email_protect.rb', line 85 def generate(site) return unless AlEmailProtect.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("#{LIB_ROOT}/", "") site.static_files << PluginStaticFile.new(site, LIB_ROOT, relative_dir, File.basename(source_path)) end end |