opendena / jade.php

HAML-like template engine for PHP 5.3
MIT License
18 stars 0 forks source link

Jade.php Build Status

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.