class JekyllFileProtocol::Jekyll::UrlFilenameTag

Public Class Methods

new(tag_name, param, tokens) click to toggle source
Calls superclass method
# File lib/jekyll-file-protocol/jekyll/tags/url_filename.rb, line 10
def initialize(tag_name, param, tokens)
  super
end

Public Instance Methods

render(context) click to toggle source
# File lib/jekyll-file-protocol/jekyll/tags/url_filename.rb, line 14
def render(context)
  uri = URI.parse(context.registers[:page]['url'])

  File.basename(uri.path, File.extname(uri.path))
end