diff options
Diffstat (limited to '_plugins/base64_filter.rb')
-rw-r--r-- | _plugins/base64_filter.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/_plugins/base64_filter.rb b/_plugins/base64_filter.rb new file mode 100644 index 0000000..2bf0d6b --- /dev/null +++ b/_plugins/base64_filter.rb @@ -0,0 +1,9 @@ +require "base64" + +module Base64Filter + def base64_encode (input) + Base64.strict_encode64(input).tr('+/', '-_') + end +end + +Liquid::Template.register_filter(Base64Filter) |