Forked from dannyprose/middleman-complex-YAML-and-control-structures.haml
Created
December 13, 2011 05:24
-
-
Save tdreyno/1470738 to your computer and use it in GitHub Desktop.
Middleman: Complex YAML and Control Structures
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///// | |
/ YAML: data/some_stuff.yml | |
/ | |
/ awesome_stuff: | |
/ - title: Awesome Stuff #1 | |
/ author: Danny Palmer | |
/ content_tag: a-s-1 | |
/ | |
/ - title: Awesome Stuff #2 | |
/ author: Danny Palmer2 | |
/ content_tag: a-s-2 | |
/ | |
///// | |
///// | |
/ YAML: data/some_stuff_meta.yml | |
/ | |
/ awesome_stuff: | |
/ - meta: Awesome Stuff #1 Meta | |
/ content_tag: a-s-1 | |
/ | |
/ - meta: Awesome Stuff #2 | |
/ content_tag: a-s-2 | |
/ | |
///// | |
%ul{:class => "items"} | |
- data.some_stuff.awesome_stuff.each_with_index do |awesome_stuff, i| | |
%li | |
= awesome_stuff[:title] | |
- if data.some_stuff_meta[i].content_tag == awesome_stuff.content_tag | |
%p Awesome Meta! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment