Adapt templates for twig.js.