Sha256: 4de65f6228140bcbf85c3b0dbc0ab3064c2b955ddda8d4065f892107db8f47ed

Contents?: true

Size: 749 Bytes

Versions: 43

Compression:

Stored size: 749 Bytes

Contents

set :layout, false

class MyFeature < Middleman::Extension
  def initialize(app, options_hash = {}, &block)
    super

    app.before do
      puts '/// before ///'
    end

    app.ready do
      puts '/// ready ///'
    end

    app.before_render do |body, path, locs, template_class|
      puts "/// before_render ///"
    end

    app.after_render do |content, path, locs, template_class|
      puts "/// after_render ///"
    end

    app.before_build do |builder|
      puts "/// before_build ///"
    end

    app.after_build do |builder|
      puts "/// after_build ///"
    end
  end

  def after_configuration
    puts '/// after_configuration ///'
  end
end

::Middleman::Extensions.register(:my_feature, MyFeature)

activate :my_feature

Version data entries

43 entries across 43 versions & 3 rubygems

Version Path
middleman-core-4.6.0 fixtures/extension-hooks-app/config.rb
middleman-core-4.5.1 fixtures/extension-hooks-app/config.rb
middleman-core-4.5.0 fixtures/extension-hooks-app/config.rb
middleman-core-4.4.3 fixtures/extension-hooks-app/config.rb
middleman-core-4.4.2 fixtures/extension-hooks-app/config.rb
middleman-core-4.4.0 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.11 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.10 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.8 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.7 fixtures/extension-hooks-app/config.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-core-4.3.3/fixtures/extension-hooks-app/config.rb
middleman-core-4.3.6 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.5 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.4 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.3 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.2 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.1 fixtures/extension-hooks-app/config.rb
middleman-core-4.3.0 fixtures/extension-hooks-app/config.rb
middleman-core-with-external-sources-watch-fix-4.1.10 fixtures/extension-hooks-app/config.rb
middleman-core-with-external-sources-watch-fix-4.1.0 fixtures/extension-hooks-app/config.rb