Sha256: 3b54ac5bc31516201b76dd66b105cfe8e4b69c9bc7a2f4ac076b638b417cd52b

Contents?: true

Size: 655 Bytes

Versions: 3

Compression:

Stored size: 655 Bytes

Contents

# Frozen-string-literal: true
# Copyright: 2012 - 2017 - 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

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-assets-3.0.5 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.4 lib/jekyll/assets/patches/asset.rb
jekyll-assets-3.0.3 lib/jekyll/assets/patches/asset.rb