Class: DatoDast::Extensions::Middleman

Inherits:
Middleman::Extension
  • Object
show all
Defined in:
lib/dato_dast/extensions/middleman.rb

Instance Method Summary collapse

Instance Method Details

#after_configurationObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dato_dast/extensions/middleman.rb', line 16

def after_configuration
  return if app.mode?(:config)

  DatoDast.configure do |config|
    config.blocks = options[:blocks]
    config.highlight = options[:highlight]
    config.host = options[:host]
    config.inline_items = options[:inline_items]
    config.item_links = options[:item_links]
    config.marks = options[:marks]
    config.smart_links = options[:smart_links]
    config.types = options[:types]
    options[:wrappers].each do |type, wrappers|
      wrappers.each do |wrapper|
        config.add_wrapper(type, wrapper)
      end
    end
  end
end