From 13a4d8a9317b32c56a8640991a4eabc1b6fd92b6 Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Thu, 2 Jan 2025 20:13:36 +0100 Subject: Add include with fediverse comments --- _plugins/base64_filter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 _plugins/base64_filter.rb (limited to '_plugins/base64_filter.rb') 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) -- cgit v1.2.3