danderson/pywebgen — pull request #1 by mpetazzoni (2012-10-17 23:23:48+00:00)
Title: YAML+Jinja2 source document support

Hey Dave,

I needed pywebgen to be a bit smarter and handled YAML documents that feed variables to Jinja2 templates. This allows for the separation of content and presentation. A typical use case is when writing a blog post for example: you don't want to mess with Jinja syntax nor HTML. So you can just create a basic blog template, and create a YAML document that specifies that its layout is that blog template, and set the variables you need in your template.

I also added support for the jinja2_markdown filter so the blog contents can be written simply in Markdown and expanded with `{{ article|markdown }}` in the template.

Let me know if you have any questions!
/Max