Sha256: e3c6057f5d62c9e942e11c8978afda3e7bca27c4c2ff4536c76f2c6cbbf17423

Contents?: true

Size: 655 Bytes

Versions: 7

Compression:

Stored size: 655 Bytes

Contents

# Frozen-string-literal: true
# Copyright: 2012 - 2018 - MIT License
# Encoding: utf-8

module Jekyll
  module Assets
    module Patches
      module Sprockets
        module Asset
          attr_accessor :environment

          # --
          def digest_path
            environment.asset_config[:digest] ? \
              super : logical_path
          end

          # --
          def data_uri
            "data:#{content_type};base64,#{Rack::Utils.escape(
              Base64.encode64(to_s))}"
          end
        end
      end
    end
  end
end

# --
module Sprockets
  class Asset
    prepend Jekyll::Assets::Patches::Sprockets::Asset
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jekyll-assets-3.0.12 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.11 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.10 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.9 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.8 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.7 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.6 lib/jekyll/assets/patches/asset.rb