我有一个 yaml 文件中的项目列表,我想动态循环通过中间人应用程序中的模板,但我不确定如何或是否可以/应该更动态地执行它。
我有:
data.projects.each do |f|
proxy "/work/#{f[:name].parameterize}.html", "/work/template.html",
:locals => { name: f[:name], client: f[:client], ... } #would like to dynamically pull in keys as locals.
end
ignore "/work/template.html"
yaml:
- name: Acme Website
client: Acme Inc
overview: "Cupcake ipsum dolor sit amet wafer gummi bears pudding applicake. Jujubes brownie powder. Sweet roll powder gingerbread gummies. Cupcake ice cream sweet roll pie lollipop. Jelly-o jelly-o apple pie chupa chups jelly jujubes gingerbread. Icing carrot cake powder chupa chups. Pudding sweet roll jelly-o muffin faworki biscuit. Marzipan marshmallow cake tiramisu caramels bear claw carrot cake cotton candy. Toffee danish sweet roll. Cookie topping powder toffee ice cream muffin dragée. Soufflé caramels apple pie chocolate cake cookie cake. Macaroon tiramisu halvah soufflé. Dessert toffee halvah chocolate cake bear claw."
skills:
- design
- development
- branding
- ecommerce
stack:
- middleman
- branding
- design