require 'jekyll_plugin_support' require_relative '<%= @gem_name %>/version.rb' # This Jekyll block tag plugin is a minimal example. # # See https://www.mslinn.com/jekyll/10200-jekyll-plugin-background.html # See https://www.mslinn.com/jekyll/10400-jekyll-plugin-template-collection.html # # @example Heading for this example # Describe what this example does # {% my_block_tag param1="value1" %} # Hello, world! # {% endmy_block_tag %} # # The Jekyll log level defaults to :info, which means all the Jekyll.logger statements below will not generate output. # You can control the log level when you start Jekyll. # To set the log level to :debug, write an entery into _config.yml, like this: # plugin_loggers: # MyBlockTag: debug module <%= @class_name %> # This class implements the Jekyll block tag functionality class <%= @jekyll_class_name %> < JekyllSupport::JekyllBlock PLUGIN_NAME = '<%= @block_name %>'.freeze VERSION = <%= @class_name %>::VERSION # Put your plugin logic here. # The following variables are predefined: # @argument_string, @block_name, @config, @envs, @helper, @layout, @logger, @mode, @page, @paginator, @site and @theme # # @return [String] def render_impl(content) <%= parse_jekyll_parameters %> # Compute the return value of this Jekyll tag <<~HEREDOC
          content = '#{content}'
          <%= dump_jekyll_parameters %>
          Remaining markup: '#{@helper.remaining_markup}'.
        
HEREDOC rescue StandardError => e @logger.error { "#{self.class} died with a #{e.full_message}" } exit 3 end JekyllPluginHelper.register(self, PLUGIN_NAME) end end