PHPackages                             kylekatarnls/jade-symfony - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. kylekatarnls/jade-symfony

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

kylekatarnls/jade-symfony
=========================

Pug template engine for Symfony

2.4.0(8y ago)41.3kMITPHPPHP &gt;=5.4.0

Since Mar 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/kylekatarnls/jade-symfony)[ Packagist](https://packagist.org/packages/kylekatarnls/jade-symfony)[ RSS](/packages/kylekatarnls-jade-symfony/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (8)Versions (30)Used By (0)

This repository now lives on

Pug-Symfony
===========

[](#pug-symfony)

[![Latest Stable Version](https://camo.githubusercontent.com/6da1862b323d16d2679e803091f7725ffee341f8ced5a657db59837c25605e42/68747470733a2f2f706f7365722e707567782e6f72672f7075672d7068702f7075672d73796d666f6e792f762f737461626c652e706e67)](https://packagist.org/packages/pug-php/pug-symfony)[![Build Status](https://camo.githubusercontent.com/8e4759213775610a5c05170fdfceca1f56357787f5aa7c15224cc3b8c791ac59/68747470733a2f2f7472617669732d63692e6f72672f7075672d7068702f7075672d73796d666f6e792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pug-php/pug-symfony)[![StyleCI](https://camo.githubusercontent.com/05f62209bfddab55d26cdfb64ba8282e0cf94f1087cdfae8923de376c475bc5f/68747470733a2f2f7374796c6563692e696f2f7265706f732f36313738343938382f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/61784988)[![Test Coverage](https://camo.githubusercontent.com/06663f783d8fddbe8097b7f6947d91666aec60569e585e7924c1583ff8253eb8/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7075672d7068702f7075672d73796d666f6e792f6261646765732f636f7665726167652e737667)](https://codecov.io/github/pug-php/pug-symfony?branch=master)[![Code Climate](https://camo.githubusercontent.com/9b9529ffdfd7d4628b81844011bf47a8c758665605e2310b04ff31c1e019bc66/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7075672d7068702f7075672d73796d666f6e792f6261646765732f6770612e737667)](https://codeclimate.com/github/pug-php/pug-symfony)

Pug template engine for Symfony

Install
-------

[](#install)

In the root directory of your Symfony project, open a terminal and enter:

```
composer require pug-php/pug-symfony
```

When your are asked to install automatically needed settings, enter yes ; or if you prefer, follow the manual installation steps below.

### Manual alternative steps

[](#manual-alternative-steps)

Add pug in the templating.engines setting in **app/config/config.yml**by merging the following to your settings:

```
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 **AppKenel.php**.

Configure
---------

[](#configure)

You can set pug options by accessing the container (from controller or from the kernel) in Symfony.

```
$services = $kernel->getContainer();
$pug = $services->get('templating.engine.pug');
$pug->setOptions(array(
  'pretty' => true,
  'pugjs' => true,
  // ...
));
// You can get the Pug engine to call any method available in pug-php
$pug->getEngine()->share('globalVar', 'foo');
$pug->getEngine()->addKeyword('customKeyword', $bar);
```

See the options in the pug-php README: And methods directly available on the service:

Initial options can also be passed in parameters in your **config.yml**:

```
parameters:
    pug:
        expressionLanguage: php
```

Usage
-----

[](#usage)

Create jade views by creating files with .pug extension in **app/Resources/views** such as contact.pug with some Jade like this:

```
h1
  | Hello
  =name
```

Then call it in your controller:

```
/**
 * @Route("/contact")
 */
public function contactAction()
{
    return $this->render('contact/contact.pug', [
        'name' => 'Bob',
    ]);
}
```

Deployment
----------

[](#deployment)

In production, you better have to pre-render all your templates to improve performances. To do that, you have to add Pug\\PugSymfonyBundle\\PugSymfonyBundle in your registered bundles.

In **app/AppKernel.php**, in the `registerBundles()` method, add the Pug bundle (this has been done automatically if you installed pug-symfony 2.3 or above with automated script):

```
public function registerBundles()
{
    $bundles = [
        ...
        new Pug\PugSymfonyBundle\PugSymfonyBundle(),
    ];
```

This will make the `assets:publish` command available, now each time you deploy your app, enter the command below: `php bin/console assets:publish --env=prod`

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

28

Last Release

3184d ago

Major Versions

1.3.3 → 2.0.02016-07-29

PHP version history (2 changes)2.2.2PHP &gt;=5.5.9

2.3.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/df90c422f521bf26355c3e185a59fe7afb35531af56244dfaec03ee1d0ca6f24?d=identicon)[kylekatarn](/maintainers/kylekatarn)

---

Top Contributors

[![kylekatarnls](https://avatars.githubusercontent.com/u/5966783?v=4)](https://github.com/kylekatarnls "kylekatarnls (79 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kylekatarnls-jade-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/kylekatarnls-jade-symfony/health.svg)](https://phpackages.com/packages/kylekatarnls-jade-symfony)
```

###  Alternatives

[bkwld/laravel-pug

Pug view adapter for Laravel

15768.2k2](/packages/bkwld-laravel-pug)[simplethings/form-extra-bundle

This bundles provides extra FormType's for Symfony2

9983.8k](/packages/simplethings-form-extra-bundle)[ezsystems/repository-forms

Use Symfony forms with eZ Platform repository objects

34669.9k10](/packages/ezsystems-repository-forms)[pug-php/pug-symfony

Pug template engine for Symfony

444.4k](/packages/pug-php-pug-symfony)[nurikabe/star-rating-bundle

Symfony form type and Twig extension for quick integration of FyneWorks' Star Rating widget

103.1k](/packages/nurikabe-star-rating-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
