Class: Jekyll::Minibundle::MiniBundleBlock
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Jekyll::Minibundle::MiniBundleBlock
- Defined in:
- lib/jekyll/minibundle/mini_bundle_block.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tag_name, type, _tokens) ⇒ MiniBundleBlock
constructor
A new instance of MiniBundleBlock.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, type, _tokens) ⇒ MiniBundleBlock
Returns a new instance of MiniBundleBlock.
6 7 8 9 |
# File 'lib/jekyll/minibundle/mini_bundle_block.rb', line 6 def initialize(tag_name, type, _tokens) super @type = type.strip.to_sym end |
Class Method Details
.default_config ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/jekyll/minibundle/mini_bundle_block.rb', line 19 def self.default_config { 'source_dir' => '_assets', 'destination_path' => 'assets/site', 'assets' => [], 'attributes' => {} } end |
Instance Method Details
#render(context) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/jekyll/minibundle/mini_bundle_block.rb', line 11 def render(context) site = context.registers[:site] config = get_current_config YAML.load(super), site file = AssetFileRegistry.bundle_file config file.static_file! site file.markup end |