class Glim::LiquidTags::Link
Public Class Methods
new(tag_name, markup, options)
click to toggle source
Calls superclass method
# File lib/liquid_ext.rb, line 157 def initialize(tag_name, markup, options) super @relative_path = markup.strip end
Public Instance Methods
render(context)
click to toggle source
# File lib/liquid_ext.rb, line 162 def render(context) if file = Jekyll.sites.last.links[@relative_path] file.url else raise Glim::Error.new("link: No file found for: #{@relative_path}") end end