ralsina/nikola — pull request #469 by dflock (2013-04-19 22:16:39+00:00)
Title: Improved jinja default theme, automatically generated from defult mako one, plus mako2jina.py

This pull request improves the `default-jinja` theme, by using Jinja macros to mirror the way the `default` theme uses Mako includes.

This means that the `default` and `jinja-default` templates are now very similar to each other - in fact I wrote a Mako2Jinja converter to do the conversion (almost) automatically (https://github.com/dflock/Mako2Jinja). This should make it much easier to keep the two default themes in sync and up-to-date. The default theme can be the source and the jinja-default theme can be generated from it automatically, using mako2jinja.

Specifically, the `jinja-default` `post.tmpl` now mirrors the mako default one, using it's own `post_helper.tmpl` and `discourse_helper.tmpl` in the same way. I've done the same for base & base_helper.

I made a minor change to the import names in the `default` theme templates to avoid a namespace clash when post & base both import a different helper but both call them 'helper'.

I wrote this mainly to teach me about Jinja, Mako & Python - but it seems like it would be worthwhile to have upstream.

Please feel free to ask my for more details, or amendments, etc...

Thanks,
Dunc