I’ve commited initial Rails support for Lilu. Now you can try to install a plugin (svn://dev.railsware.com/lilu/lilu/trunk) and use the following naming schema:
app/
layouts/
application.html
application.lilu
views/
blog/
post.html
post.lilu
Typical application.html should contain complete HTML mockup where some element content should be replaced with actual data:
1 2 3 4 5 6 7 8 9 10 |
<html> <head> <title>Hello world</title> </head> <body> <div id="main"> Body goes here </div> </body> </html> |
application.lilu is pretty simple:
update('#main').with yield |
or even
replace('#main').with yield |
post.html could contain either full page with blog post or blog post design itself. in first case, you should prepend your post.lilu with something like use(’#post’).
1 2 3 4 |
<div id="post" class="post"> <div id="title">Hello, world</div> <div id="text">I'm Lilu!</div> </div> |
1 2 3 4 5 |
# Uncomment this if you have full page design in your post.html # use('#post') update('#post').with :id => @post.id, '#title' => { :id => "title-#{@post.id}", self => @post.title }, '#text' => { :id => "text-#{@post.id}", self => @post.text } |
That’s it, first Lilu + Rails experience. The above code is just from my head (too lazy to check exactly this code right now), so it can contain some minor bugs.
And yes, current Lilu implementation most probably contains bugs and problems. It’s quite young—it’s only few days old. I hope it will be getting better and better each day. I’m working on this.




