Memoize computing excerpt's relative_path (#6951)
Merge pull request 6951
This commit is contained in:
parent
ebce53dd08
commit
8c8e2db0e5
|
@ -48,7 +48,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the relative_path for the doc this excerpt belongs to with #excerpt appended
|
# Returns the relative_path for the doc this excerpt belongs to with #excerpt appended
|
||||||
def relative_path
|
def relative_path
|
||||||
File.join(doc.relative_path, "#excerpt")
|
@relative_path ||= File.join(doc.relative_path, "#excerpt")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check if excerpt includes a string
|
# Check if excerpt includes a string
|
||||||
|
|
Loading…
Reference in New Issue