blob: 3c835fdcfb07603736ecffb09dce99921889622f (
plain) (
tree)
|
|
require "facets/kernel/silence"
module Jekyll
class PageTitleTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@key = text
end
def render(context)
text = silently do
t = Jekyll::LocalizeTag.parse('t', @key, '', {})
t.render(context)
end
text || context[@key]
end
end
end
Liquid::Template.register_tag('page_title', Jekyll::PageTitleTag)
|