module Jekyll::Assets::Context

Public Instance Methods

asset_path(path, _ = {}) click to toggle source

– Allows you to get an asset by it's path. @note this SASS helper fully supports proxy arguments. @param [Hash] opts this is unused but necessary. @param [String] path the path. @return [String] the path. –

# File lib/jekyll/assets/context.rb, line 19
def asset_path(path, _ = {})
  ctx1 = Liquid::ParseContext.new
  ctx2 = Liquid::Context.new({}, {}, site: environment.jekyll)
  Jekyll::Assets::Tag.new("img", "#{path} @path", ctx1)
    .render(ctx2)
end