From d893fc764668d4e7862ab2d74929c31a3ef765ca Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 24 Aug 2017 13:22:59 -0400 Subject: [PATCH 1/2] cache parsed template --- lib/jekyll-seo-tag.rb | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/jekyll-seo-tag.rb b/lib/jekyll-seo-tag.rb index 5ba8aad..55397c4 100644 --- a/lib/jekyll-seo-tag.rb +++ b/lib/jekyll-seo-tag.rb @@ -31,7 +31,7 @@ module Jekyll def render(context) @context = context - template.render!(payload, info) + SeoTag.template.render!(payload, info) end private @@ -63,19 +63,23 @@ module Jekyll } end - def template - @template ||= Liquid::Template.parse template_contents - end - - def template_contents - @template_contents ||= begin - File.read(template_path).gsub(MINIFY_REGEX, "") + class << self + def template + @template ||= Liquid::Template.parse template_contents end - end - def template_path - @template_path ||= begin - File.expand_path "./template.html", File.dirname(__FILE__) + private + + def template_contents + @template_contents ||= begin + File.read(template_path).gsub(MINIFY_REGEX, "") + end + end + + def template_path + @template_path ||= begin + File.expand_path "./template.html", File.dirname(__FILE__) + end end end end From a3b9e34a3f306d720aa181b3c2a3c088ff486514 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 24 Aug 2017 14:27:35 -0400 Subject: [PATCH 2/2] Update for 2.3.0 --- History.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/History.markdown b/History.markdown index 7f5cc4e..7639cb2 100644 --- a/History.markdown +++ b/History.markdown @@ -1,8 +1,18 @@ ## HEAD +## 2.3.0 + +### Minor Enhancements + * Use canonical_url specified in page if present #211 * Fix for image.path causing an invalid url error #228 * Ensure `site.data.authors` is properly formatted before attempting to retrieve author meta #227 +* Convert author, image, and JSON-LD to dedicated drops #229 +* Cache parsed template #231 + +### Documentation + +* gems: is deprecated in current Jekyll version of github-pages #230 ## 2.2.3