Skip to content

SC7639/jade.php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jade.php

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

Implementation details

The fork is a complete rewrite, all the code is ported from the original jade project.

All the features from the original are supported but undertested, including inheritance and mixins.

Syntax

See original Jade Docs.

Examples

Render

namespace Jade;
require __DIR__ . '/vendor/autoload.php';
$jade = new Jade('/tmp', true);
echo $jade->render('index.jade');

Cache with Variables

namespace Jade;
require __DIR__ . '/vendor/autoload.php';
$jade = new Jade('/tmp', true);
$title = "Hello World";
$header = "this is append";
require $jade->cache('index.jade');

Try out the Example in this Repository

git clone https://github.com/JumpLink/jade.php.git
cd jade.php/example
php -S localhost:8000
xdg-open http://localhost:8000/main.php
xdg-open http://localhost:8000/variables.php

Tests

Note: Tests need to be fixed!

git clone https://github.com/JumpLink/jade.php.git
cd jade.php
composer install
php vendor/bin/phpunit src/tests/EachTest.php

Notes

Please check the git commit history for the authoritative list of contributors.

About

Jade template engine ported to PHP 5.3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 77.7%
  • HTML 21.5%
  • Other 0.8%