Sha256: 130808ca2f2d72bb30783b0217f16e8139dc6bbbfb228a4ef35021ab87ba61bc
Contents?: true
Size: 760 Bytes
Versions: 16
Compression:
Stored size: 760 Bytes
Contents
module Jekyll module AssetsPlugin class AssetPath attr_writer :anchor, :query def initialize(asset) asset.bundle! @asset = asset end def cachebust @cachebust ||= @asset.site.assets_config.cachebust end def path :hard == cachebust && @asset.digest_path || @asset.logical_path end def query query = [] query << "cb=#{@asset.digest}" if :soft == cachebust query << @query if @query return if query.empty? "?" << query.join("&") end def anchor "##{@anchor}" if @anchor end def to_s "#{@asset.site.assets_config.baseurl}/#{path}#{query}#{anchor}" end end end end
Version data entries
16 entries across 16 versions & 2 rubygems