Support fonts with asset_path
This commit is contained in:
parent
c602df30dd
commit
de1bfc440c
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,6 @@ module Middleman
|
|||
app.helpers ::Padrino::Helpers::FormatHelpers
|
||||
app.helpers ::Padrino::Helpers::RenderHelpers
|
||||
app.helpers ::Padrino::Helpers::NumberHelpers
|
||||
# app.helpers ::Padrino::Helpers::TranslationHelpers
|
||||
|
||||
app.helpers Helpers
|
||||
|
||||
|
@ -94,10 +93,11 @@ module Middleman
|
|||
when :css then css_dir
|
||||
when :js then js_dir
|
||||
when :images then images_dir
|
||||
when :fonts then fonts_dir
|
||||
else kind.to_s
|
||||
end
|
||||
source = source.to_s.tr(' ', '')
|
||||
ignore_extension = (kind == :images) # don't append extension
|
||||
ignore_extension = (kind == :images || kind == :fonts) # don't append extension
|
||||
source << ".#{kind}" unless ignore_extension || source.end_with?(".#{kind}")
|
||||
asset_folder = "" if source.start_with?('/') # absolute path
|
||||
|
||||
|
|
Loading…
Reference in a new issue