-
-
Notifications
You must be signed in to change notification settings - Fork 3
Symfony 2 and 3 manual installation
Kyle edited this page Jul 5, 2018
·
1 revision
To use Pug as a template engine in Symfony 4, you need to follow those steps:
Add the templating.engine.pug service and pug in the engines setting:
services:
templating.engine.pug:
class: Pug\PugSymfonyEngine
arguments: ["@kernel"]
framework:
templating:
engines: ['pug', 'twig', 'php']
In order to use pug cli commands, you will also need to add Pug\PugSymfonyBundle\PugSymfonyBundle
to your app/AppKenel.php.
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Pug\PugSymfonyBundle\PugSymfonyBundle(),
// ... other bundles