Class: Jekyll::Assets::Default::Favicon
- Inherits:
-
Jekyll::Assets::Default
- Object
- Extensible
- Jekyll::Assets::Default
- Jekyll::Assets::Default::Favicon
- Defined in:
- lib/jekyll/assets/plugins/html/defaults/favicon.rb
Instance Attribute Summary
Attributes inherited from Extensible
#args, #asset, #ctx, #env, #jekyll
Instance Method Summary collapse
Methods inherited from Jekyll::Assets::Default
#config, get, #run, set, set_static, static
Methods inherited from Extensible
for?, for_args?, for_type?, inherited, #initialize, internal!, internal?, requirements
Constructor Details
This class inherits a constructor from Jekyll::Assets::Extensible
Instance Method Details
#integrity? ⇒ Boolean
–
37 38 39 40 |
# File 'lib/jekyll/assets/plugins/html/defaults/favicon.rb', line 37 def integrity? config[:integrity] && !@asset.is_a?(Url) && !@args.key?(:integrity) end |
#set_href ⇒ Object
–
20 21 22 23 24 25 |
# File 'lib/jekyll/assets/plugins/html/defaults/favicon.rb', line 20 def set_href dpath = @asset.digest_path return @args[:href] = @asset.url if @asset.is_a?(Url) return @args[:href] = @env.prefix_url(dpath) unless @args[:inline] @args[:href] = @asset.data_uri end |
#set_integrity ⇒ Object
–
28 29 30 31 32 33 34 |
# File 'lib/jekyll/assets/plugins/html/defaults/favicon.rb', line 28 def set_integrity return unless integrity? @args[:integrity] = @asset.integrity unless @args.key?(:crossorigin) @args[:crossorigin] = "anonymous" end end |
#set_rel ⇒ Object
–
15 16 17 |
# File 'lib/jekyll/assets/plugins/html/defaults/favicon.rb', line 15 def set_rel @args[:rel] = "shortcut icon" end |