diff options
author | 2020-09-03 01:18:31 +0200 | |
---|---|---|
committer | 2020-09-03 01:19:05 +0200 | |
commit | 32fb874fe0e0a20b07b4dfe0f46ad98a675c5c36 (patch) | |
tree | 7028df48c53400cc9a4f4cdd45d5e2ea7f6e94c9 /_plugins | |
parent | Add version to the footer (diff) | |
download | www-32fb874fe0e0a20b07b4dfe0f46ad98a675c5c36.tar.gz www-32fb874fe0e0a20b07b4dfe0f46ad98a675c5c36.tar.bz2 www-32fb874fe0e0a20b07b4dfe0f46ad98a675c5c36.zip |
Fix the version in the footer
Jekyll is not using erb, thus we have to come
up with some liquid plugin
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/tags.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/_plugins/tags.rb b/_plugins/tags.rb index 7ad24bb..6e08746 100644 --- a/_plugins/tags.rb +++ b/_plugins/tags.rb @@ -36,7 +36,14 @@ module Gentoo ad_html end end + + class VersionTag < Liquid::Tag + def render(context) + `git rev-parse --short HEAD` + end + end end end Liquid::Template.register_tag('render_ads', Gentoo::Tags::AdsTag) +Liquid::Template.register_tag('render_version', Gentoo::Tags::VersionTag) |