alternative asset_host initializer
This commit is contained in:
parent
642ee42b4f
commit
bd47af5744
|
@ -9,10 +9,13 @@ module Middleman
|
||||||
class << self
|
class << self
|
||||||
|
|
||||||
# Once registered
|
# Once registered
|
||||||
def registered(app)
|
def registered(app, options={})
|
||||||
# Default to no host
|
|
||||||
app.config.define_setting :asset_host, false, 'The asset host to use, or false for no asset host, or a Proc to determine asset host'
|
app.config.define_setting :asset_host, false, 'The asset host to use, or false for no asset host, or a Proc to determine asset host'
|
||||||
|
|
||||||
|
if options[:host]
|
||||||
|
config[:asset_host] = options[:host]
|
||||||
|
end
|
||||||
|
|
||||||
# Include methods
|
# Include methods
|
||||||
app.send :include, InstanceMethods
|
app.send :include, InstanceMethods
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue