Sha256: 1228491f34b791aa4c54e4289b96ed8ca439284ef6d6d5cb8e56ad1ab28aa414
Contents?: true
Size: 833 Bytes
Versions: 20
Compression:
Stored size: 833 Bytes
Contents
# Require core library require 'middleman-core' # Extension namespace class MyExtension < ::Middleman::Extension option :my_option, 'default', 'An example option' def initialize(app, options_hash={}, &block) # Call super to build options from the options_hash super # Require libraries only when activated # require 'necessary/library' # set up your extension # puts options.my_option end def after_configuration # Do something end # A Sitemap Manipulator # def manipulate_resource_list(resources) # end # module do # def a_helper # end # end end # Register extensions which can be activated # Make sure we have the version of Middleman we expect # Name param may be omited, it will default to underscored # version of class name # MyExtension.register(:my_extension)
Version data entries
20 entries across 20 versions & 4 rubygems