It will be different if you stand behind.
Avane is a template engine written in PHP. It supports random CSS style names,
and packing JS files.
-
PJAX - single page technology
-
Less PHP codes.
-
Multiple templates.
-
Supports packing JS and CSS files.
-
Compiling Coffee and Sass files automatically.
-
Jade-like coding style, though you are still able to write templates in HTML.
-
Configure your templates in YAML configuration files, without YAML modules.
Service | Status |
---|---|
Travis CI | |
Caris Events |
We have moved the tutorials to Gitbook.
You can read a complete Avane document on Gitbook.
Or even download the document as PDF files to read them at anytime.
Construct an Avane class, and pass the path of templates directory.
$avane = new Avane\Main('default');
Create a template like below and save it to default/tpls/homepage.jade
.
div
Hey, I'm #{$name}!
Next, create a Jade file named index.jade
and copy the code below into it.
$avane = new Avane\Main('default');
$avane->render('homepage', ['name' => 'Yami Odymel']);
Finally, access index.php
with your browser and you should get this:
<div>Hey, I'm Yami Odymel!</div>
Get inspired, use Avane better by reading these.
Latte: amazing template engine for PHP
Roll Your Own Templating System in PHP
Creating a Simple Template Engine with OO PHP.
Creating your own template engine in JavaScript: part 1
How to Use PHP instead of Twig for Templates