PHPackages                             orbis-labs/pug-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. orbis-labs/pug-symfony

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

orbis-labs/pug-symfony
======================

Pug template engine for Symfony

2.2.3(8y ago)072MITPHPPHP &gt;=5.5.9

Since Jun 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/orbis-labs/pug-symfony)[ Packagist](https://packagist.org/packages/orbis-labs/pug-symfony)[ RSS](/packages/orbis-labs-pug-symfony/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (5)Versions (21)Used By (0)

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

[](#pug-symfony)

[![Latest Stable Version](https://camo.githubusercontent.com/f1bf078c0d4529b4f4920ad78394448a5450a3454544ab4196544e607aa0e57c/68747470733a2f2f706f7365722e707567782e6f72672f6f726269732d6c6162732f7075672d73796d666f6e792f762f737461626c652e706e67)](https://packagist.org/packages/orbis-labs/pug-symfony)[![Build Status](https://camo.githubusercontent.com/76a7dd226014e809975a25cf725a02915f8fae090744e21c704e81943ea54c09/68747470733a2f2f7472617669732d63692e6f72672f6f726269732d6c6162732f7075672d73796d666f6e792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pug-php/pug-symfony)[![StyleCI](https://camo.githubusercontent.com/05f62209bfddab55d26cdfb64ba8282e0cf94f1087cdfae8923de376c475bc5f/68747470733a2f2f7374796c6563692e696f2f7265706f732f36313738343938382f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/61784988)[![Code Climate](https://camo.githubusercontent.com/9b9529ffdfd7d4628b81844011bf47a8c758665605e2310b04ff31c1e019bc66/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7075672d7068702f7075672d73796d666f6e792f6261646765732f6770612e737667)](https://codeclimate.com/github/orbis-labs/pug-symfony)

Pug template engine for Symfony

Install
-------

[](#install)

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

```
composer require orbis-labs/pug-symfony
```

Add in **app/config/services.yml**:

```
services:
    templating.engine.pug:
        class: PugBundle\PugTemplateEngine
        arguments: ["@kernel"]
```

Add jade in the templating.engines setting in **app/config/config.yml**:

```
...
    templating:
        engines: ['pug', 'twig', '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:

Usage
-----

[](#usage)

Create jade views by creating files with .pug extension in **app/Resources/views** such as contact.html.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.html.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:

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

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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.9% 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 ~25 days

Recently: every ~83 days

Total

16

Last Release

3283d ago

Major Versions

1.3.3 → 2.0.02016-07-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2185717?v=4)[Andy Ecca](/maintainers/aecca)[@aecca](https://github.com/aecca)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/orbis-labs-pug-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/orbis-labs-pug-symfony/health.svg)](https://phpackages.com/packages/orbis-labs-pug-symfony)
```

###  Alternatives

[bkwld/laravel-pug

Pug view adapter for Laravel

15768.2k2](/packages/bkwld-laravel-pug)[pug-php/pug-symfony

Pug template engine for Symfony

444.4k](/packages/pug-php-pug-symfony)[ci-pug/ci-pug

HAML-like template engine for CodeIgniter

211.8k](/packages/ci-pug-ci-pug)

PHPackages © 2026

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