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