Sha256: 1813fb7ab2cf526120b7ab43dadfcdef3d6cffca2966d1ce2e3e24fc956b807b

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

# Require core library
require "middleman-core"

# Extension namespace
module MyExtension < Middleman::Extension
  option :my_option, "default", "An example option"

  def initialize(app, options_hash={})
    # Call super to build options from the options_hash
    super

    # Require libraries only when activated
    # require 'necessary/library'

    # Include helpers or instance methods for the Middleman app
    # app.send :include, Helpers

    # set up your extension
    # puts options.my_option
  end

  def after_configuration
    # Do something
  end

  # module Helpers
  #   def a_helper
  #   end
  # end

end

# Register extensions which can be activated
# Make sure we have the version of Middleman we expect
# ::Middleman::Extensions.register(:extension_name) do
#
#   # Return the extension class
#   ::MyExtension
#
# end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-core-3.1.0.beta.1 lib/middleman-core/templates/extension/lib/lib.rb