diff --git a/fixtures/test-app/source/images/Chrome_Logo.svg b/fixtures/test-app/source/images/Chrome_Logo.svg new file mode 100644 index 00000000..e44e9428 --- /dev/null +++ b/fixtures/test-app/source/images/Chrome_Logo.svg @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fixtures/test-app/source/index.html.haml b/fixtures/test-app/source/index.html.haml index 6ef080c6..e4ac5057 100755 --- a/fixtures/test-app/source/index.html.haml +++ b/fixtures/test-app/source/index.html.haml @@ -1,5 +1,7 @@ %h1 Welcome += image_tag "Chrome_Logo.svg" + :markdown ## H2 diff --git a/lib/middleman/builder.rb b/lib/middleman/builder.rb index 6858ca63..5d5569f8 100644 --- a/lib/middleman/builder.rb +++ b/lib/middleman/builder.rb @@ -131,7 +131,7 @@ module Middleman end def execute! - sort_order = %w(.png .jpeg .jpg .gif .bmp .ico .woff .otf .ttf .eot .js .css) + sort_order = %w(.png .jpeg .jpg .gif .bmp .svg .svgz .ico .woff .otf .ttf .eot .js .css) paths = @app.sitemap.all_paths.sort do |a, b| a_ext = File.extname(a) diff --git a/lib/middleman/extensions/asset_host.rb b/lib/middleman/extensions/asset_host.rb index d5a637d2..f9f05db2 100644 --- a/lib/middleman/extensions/asset_host.rb +++ b/lib/middleman/extensions/asset_host.rb @@ -19,7 +19,7 @@ module Middleman::Extensions def asset_url(path, prefix="") original_output = super - valid_extensions = %w(.png .gif .jpg .jpeg .js .css) + valid_extensions = %w(.png .gif .jpg .jpeg .svg .svgz .js .css) asset_prefix = if asset_host.is_a?(Proc) asset_host.call(original_output) diff --git a/lib/middleman/extensions/cache_buster.rb b/lib/middleman/extensions/cache_buster.rb index e48eb885..f0ee1a0e 100755 --- a/lib/middleman/extensions/cache_buster.rb +++ b/lib/middleman/extensions/cache_buster.rb @@ -23,7 +23,7 @@ module Middleman::Extensions def asset_url(path, prefix="") http_path = super - if http_path.include?("://") || !%w(.css .png .jpg .js .gif).include?(File.extname(http_path)) + if http_path.include?("://") || !%w(.css .png .jpg .jpeg .svg .svgz .js .gif).include?(File.extname(http_path)) http_path else begin