Class: Jekyll::SeoTag

Inherits:
Liquid::Tag show all
Defined in:
lib/jekyll-seo-tag.rb,
lib/jekyll-seo-tag/version.rb

Constant Summary collapse

MINIFY_REGEX =
/(>\n|[%}]})\s+(<|{[{%])/
VERSION =
'1.2.0'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_tag_name, text, _tokens) ⇒ SeoTag

Returns a new instance of SeoTag.



9
10
11
12
# File 'lib/jekyll-seo-tag.rb', line 9

def initialize(_tag_name, text, _tokens)
  super
  @text = text
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



5
6
7
# File 'lib/jekyll-seo-tag.rb', line 5

def context
  @context
end

Instance Method Details

#render(context) ⇒ Object



14
15
16
17
# File 'lib/jekyll-seo-tag.rb', line 14

def render(context)
  @context = context
  template.render!(payload, info)
end