2020-08-16 15:08:50 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-11-07 12:51:19 -05:00
|
|
|
set :layout, false
|
|
|
|
|
|
|
|
class MyFeature < Middleman::Extension
|
|
|
|
def initialize(app, options_hash = {}, &block)
|
|
|
|
super
|
|
|
|
|
|
|
|
app.before_server do |server_information|
|
|
|
|
puts "/// #{server_information.listeners.first} ///"
|
|
|
|
puts "/// #{server_information.port} ///"
|
|
|
|
puts "/// #{server_information.server_name} ///"
|
|
|
|
puts "/// #{server_information.site_addresses.first} ///"
|
2018-09-11 14:43:07 -04:00
|
|
|
puts '/// ### END ### ///'
|
2015-11-07 12:51:19 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
::Middleman::Extensions.register(:my_feature, MyFeature)
|
|
|
|
|
|
|
|
activate :my_feature
|