From 993eafce00fb1f0665db2f10a1b042fb98db1480 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 11 Apr 2017 14:54:21 -0500 Subject: [PATCH] memoize title? --- lib/jekyll-seo-tag/drop.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/jekyll-seo-tag/drop.rb b/lib/jekyll-seo-tag/drop.rb index d5784d0..97f599e 100644 --- a/lib/jekyll-seo-tag/drop.rb +++ b/lib/jekyll-seo-tag/drop.rb @@ -22,7 +22,8 @@ module Jekyll # Should the `` tag be generated for this page? def title? return false unless title - @text !~ %r!title=false!i + return @display_title if defined?(@display_title) + @display_title = (@text !~ %r!title=false!i) end def site_title