Memoize computing excerpt's relative_path (#6951)

Merge pull request 6951
This commit is contained in:
Ashwin Maroli 2018-05-01 05:30:11 +05:30 committed by jekyllbot
parent ebce53dd08
commit 8c8e2db0e5
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ module Jekyll
#
# Returns the relative_path for the doc this excerpt belongs to with #excerpt appended
def relative_path
File.join(doc.relative_path, "#excerpt")
@relative_path ||= File.join(doc.relative_path, "#excerpt")
end
# Check if excerpt includes a string