Sha256: 1dee7ce72dadd47fa2e51d434d328a55b8ead4ba885e208c86d8a098d6b0e8d8
Contents?: true
Size: 1.37 KB
Versions: 40
Compression:
Stored size: 1.37 KB
Contents
# ------------------------------------------------------------------------------ # ~/_plugins/encodeBase64.rb # Liquid filter for J1 Template to Base64 encode # # Product/Info: # http://jekyll.one # # Copyright (C) 2022 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE # ------------------------------------------------------------------------------ # NOTE: # CustomFilters cannot be used in SAFE mode (e.g not usable for # rendering pages with Jekyll on GitHub # # USAGE: # {% capture cache_name %} # # liquid code to generate HTML output goes here # # {% endcapture %} # {{ cache_name | encode64 }} # # ------------------------------------------------------------------------------ # noinspection SpellCheckingInspection # rubocop:disable Lint/UnneededDisable # rubocop:disable Style/Documentation # rubocop:disable Metrics/LineLength # rubocop:disable Layout/TrailingWhitespace # rubocop:disable Layout/SpaceAroundOperators # rubocop:disable Layout/ExtraSpacing # rubocop:disable Metrics/AbcSize # ------------------------------------------------------------------------------ require 'base64' module Jekyll module EncodeBase64 def encodeBase64(input) encoded = Base64.encode64(input) input = encoded end end end Liquid::Template.register_filter(Jekyll::EncodeBase64)
Version data entries
40 entries across 40 versions & 1 rubygems