benschwarz / bonsai

A tiny static web site generator
http://tinytree.info/
MIT License
297 stars 39 forks source link

Own array with .rb #25

Open Spica2 opened 12 years ago

Spica2 commented 12 years ago

Want to have an own array with MyVarsDrop.rb on indexlevel (next to site.yml)

class MyVarsDrop < Liquid::Drop def array [1,2,3,4,5,6,7] end end

but cant call it in my liquid files ( tried {{array}} and {{MyVarsDrop}}

benschwarz commented 12 years ago

Thats not really how liquid works…

http://liquid.rubyforge.org/classes/Liquid/Drop.html

You'd need to be able to manually bind a variable to your drop… If you want to come up with how you think that could work in Bonsai, I'd be happy to have a stab at implementing it.