Hi all. Tell me, can jekyll generate pages from a yaml file as middleman
example in middleman
data/people.yml
friends:
-
url: tom_url.html
name: Tom
age: 30 -
url: dick_url.html
name: Dick
age: 20
config.rb
data.people.friends.each do |friend|
proxy “#{friend.url}”, “friend_detail_template.html”, locals: { friend: friend }
end
it will automatically generate pages: tom_url.html and dick_url.html
and through the locals, will access the properties of the object
tom_url.html
friend.name >> Tom
friend.age >> 30