From 5848a1052714da051ff8361dd880004e8cdc75ce Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Fri, 11 Nov 2016 16:31:04 +0100 Subject: webdocs: add rendering date in footer Change-Id: Id73d13cefdcea8687cdc94754354522e34ba266d Signed-off-by: Stephane Desneux --- site/_plugins/render_time.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 site/_plugins/render_time.rb (limited to 'site/_plugins/render_time.rb') 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

{% render_time page rendered at: %}

+ +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) -- cgit 1.2.3-korg