map with proc for CSV loading
This commit is contained in:
parent
3a89923142
commit
866935dadf
|
@ -226,7 +226,7 @@ module Jekyll
|
||||||
else
|
else
|
||||||
case File.extname(path).downcase
|
case File.extname(path).downcase
|
||||||
when '.csv'
|
when '.csv'
|
||||||
data[key] = CSV.read(path, headers: true).map{|x| x.to_hash}
|
data[key] = CSV.read(path, headers: true).map(&:to_hash)
|
||||||
else
|
else
|
||||||
data[key] = SafeYAML.load_file(path)
|
data[key] = SafeYAML.load_file(path)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue