blob: afd0fb498960b7d4d7d9512e21be68de3061c4b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Check doc at http://jekyllrb.com/docs/plugins/#tags
# use in page with <p>{% render_time page rendered at: %}</p>
module Jekyll
class RenderTimeTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@text = text
end
def render(context)
"#{@text} #{Time.now}"
end
end
end
Liquid::Template.register_tag('render_time', Jekyll::RenderTimeTag)
|