Memoize defaults computed for Convertibles (#8451)

Merge pull request 8451
This commit is contained in:
Ashwin Maroli 2020-11-02 14:34:21 +05:30 committed by GitHub
parent e06641f423
commit a6bbcb7fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -117,7 +117,6 @@ module Jekyll
hsh[attribute] = send(attribute) hsh[attribute] = send(attribute)
end end
defaults = site.frontmatter_defaults.all(relative_path, type)
Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data) Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data)
end end
@ -247,6 +246,10 @@ module Jekyll
private private
def defaults
@defaults ||= site.frontmatter_defaults.all(relative_path, type)
end
def no_layout? def no_layout?
data["layout"] == "none" data["layout"] == "none"
end end