Sha256: c734c059ed18e4a15c15ee8a9677bf4f25bbde8085ddc127031a74ee60059903
Contents?: true
Size: 648 Bytes
Versions: 16
Compression:
Stored size: 648 Bytes
Contents
# stdlib require "set" module Jekyll module AssetsPlugin module Patches module ContextPatch def site self.class.instance_variable_get :@site end def jekyll_assets @jekyll_assets ||= Set.new end def asset_path(pathname, *args) return "" if pathname.to_s.strip.empty? asset = resolve(pathname.to_s[/^[^#?]+/]).to_s jekyll_assets << asset (site.asset_path asset, *args) + (pathname.to_s[/[#?].+/] || "") rescue Sprockets::FileNotFound raise Environment::AssetNotFound, pathname end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems