We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 85934ae + 5672ec3 commit 7a0ee09Copy full SHA for 7a0ee09
lib/jekyll-seo-tag.rb
@@ -11,7 +11,7 @@ class SeoTag < Liquid::Tag
11
12
def render(context)
13
@context = context
14
- output = Liquid::Template.parse(template_contents).render!(payload, info)
+ output = template.render!(payload, info)
15
16
# Encode smart quotes. See https://github.com/benbalter/jekyll-seo-tag/pull/6
17
output.gsub!(HTML_ESCAPE_REGEX, HTML_ESCAPE)
@@ -35,6 +35,10 @@ def info
35
}
36
end
37
38
+ def template
39
+ @template ||= Liquid::Template.parse template_contents
40
+ end
41
+
42
def template_contents
43
@template_contents ||= File.read(template_path).gsub(/(>\n|[%}]})\s+(<|{[{%])/,'\1\2').chomp
44
0 commit comments