aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '_plugins')
-rw-r--r--_plugins/tags.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/_plugins/tags.rb b/_plugins/tags.rb
index 6e08746..66bfb64 100644
--- a/_plugins/tags.rb
+++ b/_plugins/tags.rb
@@ -42,8 +42,18 @@ module Gentoo
`git rev-parse --short HEAD`
end
end
- end
+
+ class CurrentYearTag < Liquid::Tag
+ def render(context)
+ `date +%Y`
+ end
+ end
+
+
+end
end
Liquid::Template.register_tag('render_ads', Gentoo::Tags::AdsTag)
Liquid::Template.register_tag('render_version', Gentoo::Tags::VersionTag)
+Liquid::Template.register_tag('render_current_year', Gentoo::Tags::CurrentYearTag)
+