# Create pages from yaml data

**URL:** <https://talk.jekyllrb.com/t/create-pages-from-yaml-data/2041>\
**Category:** Help\
**Created:** [August 9, 2018, 6:28pm UTC](https://talk.jekyllrb.com/t/create-pages-from-yaml-data/2041 "2018-08-09T18:28:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![railsivel](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@railsivel](https://talk.jekyllrb.com/u/railsivel)\
**Post date:** [August 9, 2018, 6:28pm UTC](https://talk.jekyllrb.com/t/create-pages-from-yaml-data/2041/1 "2018-08-09T18:28:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yashumittal](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/yashumittal/32/1260_2.png) [@yashumittal](https://talk.jekyllrb.com/u/yashumittal)\
**Post date:** [August 9, 2018, 6:32pm UTC](https://talk.jekyllrb.com/t/create-pages-from-yaml-data/2041/2 "2018-08-09T18:32:35Z")

</div>

As far I know, you can by writing custom plugin in `_plugins` directory.

---

<div class="post-metadata">

**Author:** ![olea](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/olea/32/5328_2.png) [@olea](https://talk.jekyllrb.com/u/olea)\
**Post date:** [October 12, 2018, 5:09pm UTC](https://talk.jekyllrb.com/t/create-pages-from-yaml-data/2041/3 "2018-10-12T17:09:28Z")

</div>

> [@yashumittal](#):
>
> As far I know, you can by writing custom plugin in `_plugins` directory.

Seems that can be the way, as I see at [http://jimpravetz.com/blog/2011/12/generating-jekyll-pages-from-data/](http://jimpravetz.com/blog/2011/12/generating-jekyll-pages-from-data/)

---

<div class="post-metadata">

**Author:** ![olea](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/olea/32/5328_2.png) [@olea](https://talk.jekyllrb.com/u/olea)\
**Post date:** [October 12, 2018, 7:25pm UTC](https://talk.jekyllrb.com/t/create-pages-from-yaml-data/2041/4 "2018-10-12T19:25:46Z")

</div>

I think the solution is [jekyll-datapage\_gen](http://www.jekyll-plugins.com/plugins/jekyll-datapage_gen).

It includes a [working example](https://github.com/avillafiorita/jekyll-datapage_gen/tree/master/example) too.
