aboutsummaryrefslogtreecommitdiffstats
path: root/site/_plugins/render_time.rb
diff options
context:
space:
mode:
Diffstat (limited to 'site/_plugins/render_time.rb')
-rw-r--r--site/_plugins/render_time.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/site/_plugins/render_time.rb b/site/_plugins/render_time.rb
new file mode 100644
index 0000000..afd0fb4
--- /dev/null
+++ b/site/_plugins/render_time.rb
@@ -0,0 +1,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)