The reading team is keen to migrate away from Hogan to Mustache so that we are consistent with the MediaWiki way of doing things and benefit from the larger MediaWiki universe making use of the same template language.
It should be possible for all our templates written in Hogan to run as Mustache. However this may not be the case. There are subtle differences.
- Force all hogan templates to run with Mustache compiler. [1]
- File bugs for any templates that have rendering issues when run as Mustache templates.
[1] there are 2 ways to do this:
- Create a script that renames all hogan templates to mustache. Update our module definitions to use the mustache files
- Update circuit mediawiki.template.hogan so that it uses the Mustache compiler.
#2 should be suitable for this task, but #1 would help us do the migration in future.
Known problems
{#foo}<h2>{{foo}}</h2>{{/foo}}
will render in Hogan if foo is not an empty string.
In mustache behaviour appears to be different. Any # tags have to be truthy or accessors e.g. foo= { foo: text }.