Sha256: 7e91a7db0fe510d7323182d7e81719d1fe208f48f94b4730f20d79eed03c3b88

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 Bytes

Contents

# Title: Mr. Poole's Plugin
# Author: Ian Carrico https://iamcarrico.com
# Description: Output a list of metatags for your site.
#
# Syntax {% poole_tags  %}
#

require 'liquid'
require 'date'

require 'poole/renderer'

module Jekyll
  module PoolePlugin
    # Adding in our class tags.
    class Tags < Liquid::Tag
      def initialize(_tag_name, text, _tokens)
        text = text.strip
        @text = text.empty? ? 'all' : text
      end

      def render(context)
        Renderer.new(context, @markup).public_send :"render_#{@text}"\
      end
    end
  end
end

Liquid::Template.register_tag('poole_tags', Jekyll::PoolePlugin::Tags)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-poole-0.2.0 lib/poole/tags.rb
jekyll-poole-0.1.0 lib/poole/tags.rb