ddfreyne/nanoc — Issue #91: Mustache Filter
Author: sorin-ionescu
Created: 2012-02-06 07:23:05+00:00
State: open

The Mustache filter is not layout and view aware; so, `{{{yield}}}` does not work.

Should not the filter be akin to the code bellow?

```ruby
require 'mustache'
module Nanoc3::Filters
class Mustache < Nanoc3::Filter
def run(content, params={})
context = item.attributes.dup # frozen, why?
context[:yield] = assigns[:content]
::Mustache.render(content, context)
end
end
end
```

In order to do this properly, it's a bit more [complicated](https://github.com/defunkt/mustache/blob/master/lib/mustache/sinatra.rb#L54).