Class: Middleman::Indexer::Lunrjs
- Inherits:
-
Extension
- Object
- Extension
- Middleman::Indexer::Lunrjs
- Defined in:
- lib/middleman-lunrjs/extension.rb
Defined Under Namespace
Classes: Indexer
Instance Method Summary collapse
-
#initialize(app, options_hash = {}, &block) ⇒ Lunrjs
constructor
A new instance of Lunrjs.
Constructor Details
#initialize(app, options_hash = {}, &block) ⇒ Lunrjs
Returns a new instance of Lunrjs.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/middleman-lunrjs/extension.rb', line 15 def initialize(app, ={}, &block) puts ('Init lunrjs ') super return unless app.environment == :build opts = .dup.to_h opts.delete_if { |k, v| v.nil? } app.before_build do opts[:sitemap] = sitemap Indexer.new(app, opts) end end |