Sha256: 650191c7f5fe72fe62e8bce78fa235fee6dcbb522f31c6dbf56f14ca68828818

Contents?: true

Size: 422 Bytes

Versions: 4

Compression:

Stored size: 422 Bytes

Contents

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

Jekyll::Assets::Hook.register :env, :init do
  context_class.class_eval do
    alias_method :_old_asset_path, :asset_path
    def asset_path(asset, opts = {})
      out = _old_asset_path asset

      return unless out
      path = environment.find_asset(resolve(asset))
      environment.parent.used.add(path)
    out
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-assets-2.0.3 lib/jekyll/assets/hooks/context_patches.rb
jekyll-assets-2.0.2 lib/jekyll/assets/hooks/context_patches.rb
jekyll-assets-2.0.1 lib/jekyll/assets/hooks/context_patches.rb
jekyll-assets-2.0.0 lib/jekyll/assets/hooks/context_patches.rb