PHPackages                             clthck/cakephp-pug - 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. clthck/cakephp-pug

ActiveCakephp-plugin[Templating &amp; Views](/categories/templating)

clthck/cakephp-pug
==================

Pug Template Engine Plugin for CakePHP 3

v1.0.1(9y ago)6241MITPHPPHP &gt;=5.5.30

Since Jan 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/clthck/cakephp-pug)[ Packagist](https://packagist.org/packages/clthck/cakephp-pug)[ RSS](/packages/clthck-cakephp-pug/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (13)Used By (0)

[![Build Status](https://camo.githubusercontent.com/9e1fe2d5f022308002a7bd8afa4a0949f3ff7a265f885f5f9113f5cdd76264f1/68747470733a2f2f7472617669732d63692e6f72672f636c7468636b2f63616b657068702d7075672e737667)](https://travis-ci.org/clthck/cakephp-pug)[![Latest Stable Version](https://camo.githubusercontent.com/05423b932ad0e5a6ad90e0bdde08cdf9a2be4088311ba2862e08be04c69815eb/68747470733a2f2f706f7365722e707567782e6f72672f636c7468636b2f63616b657068702d7075672f762f737461626c65)](https://packagist.org/packages/clthck/cakephp-pug)[![Total Downloads](https://camo.githubusercontent.com/dd205045fb3e72442f0d3f25d7a591cac092e30d683aa376d1ead5d5e6d5e6bf/68747470733a2f2f706f7365722e707567782e6f72672f636c7468636b2f63616b657068702d7075672f646f776e6c6f616473)](https://packagist.org/packages/clthck/cakephp-pug)[![License](https://camo.githubusercontent.com/b36775a0ffb64793c76fe83f37a5b83f1836c5d1bbb3779314ad205c7b48c3ab/68747470733a2f2f706f7365722e707567782e6f72672f636c7468636b2f63616b657068702d7075672f6c6963656e7365)](https://packagist.org/packages/clthck/cakephp-pug)

Pug Template Engine Plugin for CakePHP 3
========================================

[](#pug-template-engine-plugin-for-cakephp-3)

Powered by [Tale Pug for PHP](https://github.com/Talesoft/tale-pug).

Installation
------------

[](#installation)

1. Download [Composer](http://getcomposer.org/doc/00-intro.md) or update `composer self-update`.
2. Run `php composer.phar require clthck/cakephp-pug`.

If Composer is installed globally, run

```
composer require clthck/cakephp-pug
```

Bootstrap
---------

[](#bootstrap)

Add the following to your `config/bootstrap.php` to load the plugin.

```
Plugin::load('PugView');
```

Application Wide Usage
----------------------

[](#application-wide-usage)

Place the following to your `AppController.php` to load the PugView class.

```
public function initialize()
{
    parent::initialize();

    $this->viewBuilder()
        ->className('PugView.Pug')
        ->options(['pretty' => false]);
}
```

What if we need to load additional helpers for our PugView instance? In this case, we can make AppView class inherit PugView class:

```
...
use PugView\View\PugView;
...
class AppView extends PugView
{
	...
	public function initialize()
	{
	    $this->viewOptions([
	        'pretty' => true
	    ]);

	    parent::initialize();

	    $this->loadHelper('Form', [
	        'templates' => 'form_template'
	    ]);
	}
}
```

In Template File (.ctp.pug)
---------------------------

[](#in-template-file-ctppug)

Use `$view` instead of `$this`.

```
= $view->Flash->render()
```

Usage Example of CakePHP JavaScript block
-----------------------------------------

[](#usage-example-of-cakephp-javascript-block)

```
- $view->Html->scriptStart(['block' => true])
|
	$(function() {
		// Your js code goes here..
	});

- $view->Html->scriptEnd()

```

If you're using Sublime Text 2/3, you need to install [cakephp-jade-tmbundle](http://github.com/clthck/cakephp-jade-tmbundle/tree/master) to make syntax highlighting work properly.

Language Syntax Reference
-------------------------

[](#language-syntax-reference)

Please check [jade.talesoft.codes](http://jade.talesoft.codes/) for syntax reference.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 80.8% 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 ~37 days

Recently: every ~101 days

Total

12

Last Release

3366d ago

Major Versions

v0.1.4 → v1.0.02017-02-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/7220c1052cb63189d5bfc1d8a99017c03378faf3538cb9e3683f3dd0ff72efcf?d=identicon)[aavrug](/maintainers/aavrug)

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

---

Top Contributors

[![fantastic16](https://avatars.githubusercontent.com/u/22222825?v=4)](https://github.com/fantastic16 "fantastic16 (21 commits)")[![aavrug](https://avatars.githubusercontent.com/u/1022358?v=4)](https://github.com/aavrug "aavrug (5 commits)")

---

Tags

cakephpcakephp-plugincakephp-pugcomposerpugcakephpviewcakephp3pug

### Embed Badge

![Health badge](/badges/clthck-cakephp-pug/health.svg)

```
[![Health](https://phpackages.com/badges/clthck-cakephp-pug/health.svg)](https://phpackages.com/packages/clthck-cakephp-pug)
```

###  Alternatives

[friendsofcake/cakephp-csvview

A CSV View class for CakePHP

1762.5M3](/packages/friendsofcake-cakephp-csvview)[wyrihaximus/twig-view

Twig powered View for CakePHP

804.7M1](/packages/wyrihaximus-twig-view)[dereuromark/cakephp-ajax

A CakePHP plugin that makes working with AJAX a piece of cake.

55255.9k1](/packages/dereuromark-cakephp-ajax)[dereuromark/cakephp-feed

A CakePHP plugin containing a RssView to generate RSS feeds.

1353.7k1](/packages/dereuromark-cakephp-feed)[dereuromark/cakephp-meta

A CakePHP plugin for SEO meta tags, OpenGraph and Twitter Cards

1012.9k1](/packages/dereuromark-cakephp-meta)

PHPackages © 2026

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