winton / stasis

Static sites made powerful
http://stasis.me
MIT License
677 stars 56 forks source link

Add YAML metadata parsing #28

Closed andreapavoni closed 12 years ago

andreapavoni commented 12 years ago

I reopen this topic from issue #6 because I think the problem is another: it would be very useful to embed YAML metadata inside files (like Jekyll -> https://github.com/mojombo/jekyll/wiki/yaml-front-matter).

I looked at code, it seems like (almost) each file to render is passed to Tilt templating system. So, to get it working, it needs to pass to Tilt a String instead of a path, so it will be easy to split and parse YAML from contents.

winton commented 12 years ago

I don't think I'm interested in loading metadata this way. I would prefer have less magic and allow users to load YAML metadata in a before block.