This is a minimal demo of Twig.
To install it, use composer by running
composer install
Then, assuming you are using PHP >= 5.4, go to the public
directory by typing
cd public
And launch the PHP builtin web server on port 8000
php -S localhost:8000
You should now see the demo in your browser by navigating to http://localhost:8000
You can :
- customize your template in
templates/index.html.twig
. - make new variables available to your template by defining them in the
config/vars.php
.
You do not need to restart the PHP server when you define new variables or modify the template.