Sha256: 2f1ba0f4f189816c0f1dce1d9bb1f829665d71907832ff272f88d7dd4bdd95e0
Contents?: true
Size: 834 Bytes
Versions: 15
Compression:
Stored size: 834 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
15 entries across 15 versions & 1 rubygems