mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
consider a case of "site" is unavailable in Convertible
This commit is contained in:
committed by
Shigeya Suzuki
parent
f4c2383d3c
commit
4cb24f4b87
@@ -28,7 +28,8 @@ module Jekyll
|
||||
# Returns nothing.
|
||||
def read_yaml(base, name)
|
||||
begin
|
||||
self.content = File.read(File.join(base, name), self.site.file_read_opts)
|
||||
opts = self.site ? self.site.file_read_opts : {}
|
||||
self.content = File.read(File.join(base, name), opts)
|
||||
|
||||
if self.content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
|
||||
self.content = $POSTMATCH
|
||||
|
||||
Reference in New Issue
Block a user