memoize title?

This commit is contained in:
Ben Balter 2017-04-11 14:54:21 -05:00
parent 791db5107c
commit 993eafce00
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ module Jekyll
# Should the `<title>` 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