I am creating a New Middleman website for the first time. I have roughly 20,000 pages I would like to make static and I am nearly there except for this 1 glooming problem. I have a CSV file that is produced monthly that I will convert to yaml.
The structure I have is identical to below: data/people.yml (code from middleman website)
friends:
-
name: Bob Smith
address: 101 Foo Lane
birth: 1966-03-03
-
name: Mary Johnson
address: 120 Bar St
birth: 1967-06-18
I can loop through without a hitch using the below code:
<% data.people.friends.each do |f| %>
<%= f.name %><br/>
<%= f.address %><br/>
<%= f.birth %><br/><br/>
<% end %>
Which produces:
Bob Smith
101 Foo Lane
1966-03-03
Mary Johnson
120 Bar St
1967-06-18
The goal for me here is to have just Bob's information when the user goes to http://www.web_site_here.com/people/bob.html etc.,
I've tried several methods like the one below, with no luck.
<% data.people.friends.each do |name, person| %>
<%= person.name %>
<% end %>