Supported template engines

As miyagi uses consolidate.js, most of its template engines should work out of the box.

The following template engines have been tested and appear to work without problems:

Due to the nature of their APIs, there might be some constraints though.

The following engines do not allow passing data into includes, but the data is globally available:

Because of that, miyagi's concept of using mock data does not work. Nevertheless, you can still define all variables manually in your mock files. These variables will then be available in your included components.

If you use pug, you could also use a mixin and would then be able to use mock data. However, miyagi is not able to render mixins independently, so you could only render them in the context of the including file.

The following engines do not allow passing data into includes and the data is not globally available:

If you use nunjucks, you could set a variable in your component (e.g. {% set myVar = myData.myVar %} which creates a global variable. This would be available in the included component. Alternatively, you could use a macro, but miyagi is not able to render these independently, so you could only render them in the context of the including file.

Engines that do not support includes at all:

miyagi does not work with the following template engines: