Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created February 12, 2010 22:16
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save defunkt/303039 to your computer and use it in GitHub Desktop.
Save defunkt/303039 to your computer and use it in GitHub Desktop.
Haml + Mustache
#content
.left.column
%h2 Welcome to our site!
.right.column
#users
{{#users}}
%p {{user}}
{{/users}}
---
users:
- { user: chris }
- { user: bob }
- { user: jones }
---
$ cat example.yml example.haml.mustache | mustache | haml -s
<div id='content'>
<div class='left column'>
<h2>Welcome to our site!</h2>
</div>
<div class='right column'>
<div id='users'>
<p>chris</p>
<p>bob</p>
<p>jones</p>
</div>
</div>
</div>
@mikesmullin
Copy link

thanks for this inspiration. see https://github.com/mikesmullin/mustache_rails3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment