fgm / twigdemo

A minimal demonstrator for Twig without any dependency except PHP and Composer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A minimal demonstrator for Twig without any dependency except PHP and Composer.

License:MIT License


Languages

Language:PHP 100.0%