Debug reading Page and Layout objects (#8100)

Merge pull request 8100
This commit is contained in:
Ashwin Maroli 2020-11-11 17:59:05 +05:30 committed by GitHub
parent d3299a8e02
commit 26086409bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -35,11 +35,11 @@ module Jekyll
# Returns nothing.
# rubocop:disable Metrics/AbcSize
def read_yaml(base, name, opts = {})
filename = File.join(base, name)
filename = @path || site.in_source_dir(base, name)
Jekyll.logger.debug "Reading:", relative_path
begin
self.content = File.read(@path || site.in_source_dir(base, name),
**Utils.merged_file_read_opts(site, opts))
self.content = File.read(filename, **Utils.merged_file_read_opts(site, opts))
if content =~ Document::YAML_FRONT_MATTER_REGEXP
self.content = $POSTMATCH
self.data = SafeYAML.load(Regexp.last_match(1))