livingsocial / rake-pipeline

An extension to Rake for dealing with a directory of inputs, a number of filters, and a directory of outputs
MIT License
276 stars 38 forks source link

Pass data from one filter to another? #81

Open joefiorini opened 12 years ago

joefiorini commented 12 years ago

Let's say I want to add a filter that allows template rendering options (mainly the layout) to be specified in YAML front matter. It seems to me that filters should be small and composable; therefore I don't want to force my Tilt filter to also handle front matter. How would I write a filter in such a way that it can parse out the front matter then hand that off to the next filter?