Module: Middleman::Extensions::AssetHost::InstanceMethods
- Defined in:
- lib/middleman-more/extensions/asset_host.rb
Overview
Asset Host Instance Methods
Instance Method Summary collapse
-
#asset_url(path, prefix = "") ⇒ String
Override default asset url helper to include asset hosts.
Instance Method Details
#asset_url(path, prefix = "") ⇒ String
Override default asset url helper to include asset hosts
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/middleman-more/extensions/asset_host.rb', line 31 def asset_url(path, prefix="") original_output = super return original_output unless asset_host asset_prefix = if asset_host.is_a?(Proc) asset_host.call(original_output) elsif asset_host.is_a?(String) asset_host end File.join(asset_prefix, original_output) end |