-
-
Notifications
You must be signed in to change notification settings - Fork 3
Symfony 4 and 5 manual installation
Kyle edited this page Nov 28, 2019
·
1 revision
To use Pug as a template engine in Symfony 4 or 5, you need to follow those steps:
Add the templating.engine.pug service:
services:
templating.engine.pug:
public: true
autowire: false
class: Pug\PugSymfonyEngine
arguments:
- '@kernel'
Add pug in the engines setting:
framework:
templating:
engines: ['pug', 'twig', 'php']
In order to use pug cli commands, you will also need to add Pug\PugSymfonyBundle\PugSymfonyBundle
to your config/bundles.php.
<?php
return [
Pug\PugSymfonyBundle\PugSymfonyBundle::class => ['all' => true],
// ... other bundles