opendena/jade.php

HAML-like template engine for PHP 5.3

dev-master 2014-03-12 09:10 UTC

This package is not auto-updated.

Last update: 2025-01-13 16:29:09 UTC


README

Jade.php adds inline PHP scripting support to the Jade template compiler.

No more maintenance

Sorry, but we lack of time to maintaining this project.

Please contact us if you want to have the ownership of this project on github/composer.

Installation

We strongly recommand to use composer

{
    "require":{
        "opendena/jade.php":"dev-master"
    }
}

Use

Creating simple tags

<?php

require __DIR__ . '/../../vendor/autoload.php';

use Jade\Jade;

$jade = new Jade();
echo $jade->render(__DIR__ .'/'. basename(__FILE__, '.php').'.jade');
div
  address
  i
  strong
<div><address></address><i></i><strong></strong></div>

Public API

$jade = new Jade\Jade();

// Parse a template (supports both string inputs and files)
echo $jade->render('h1 it works!');

Syntax

See the offical documentation Somme features are missing (tests are comment)

Open an issue if you find something missing.