推荐的Twig文件扩展名

Is there a recommended file extension for Twig templates? I've seen the following used, and would like to be consistent with the majority of other developers.

  • myTemplate.html.twig
  • myTemplate.twig
  • myTemplate.html
  • myTemplate.tmpl

Normally you define the format before the .twig extension. So when you work with Symfony2 for example you can define the output format.

myTemplate.json.twig for example. So normally you should use that format. But you don't need that.

Here is an issue but you can see how it works

https://github.com/symfony/symfony/issues/2920