PHPackages                             demontpx/easy-twig - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. demontpx/easy-twig

ActiveLibrary[Templating &amp; Views](/categories/templating)

demontpx/easy-twig
==================

Easy twig

0.3(6y ago)650MITPHPPHP ^7.2

Since Oct 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/DemonTPx/easy-twig)[ Packagist](https://packagist.org/packages/demontpx/easy-twig)[ RSS](/packages/demontpx-easy-twig/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (5)Used By (0)

Easy Twig
=========

[](#easy-twig)

[![Build Status](https://camo.githubusercontent.com/1a9d0edef6ec6a47fbd503c15f4b6c5d297b066075c014ed15eefc3ecce63bef/68747470733a2f2f7472617669732d63692e6f72672f44656d6f6e5450782f656173792d747769672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DemonTPx/easy-twig)

Easy twig is a very small and simple framework to get started with Twig quickly.

Just start editing the `templates/page/index.html.twig` to start filling in your front page and `templates/base.html.twig` to modify the skeleton. To add a new page, for example a 'contact' page, just create the `templates/page/contact.html.twig` file and you're done! See [pages](#pages).

If a page can not be found, the template `templates/error/404.html.twig` will be rendered.

Getting started
---------------

[](#getting-started)

Create a new project based on easy twig:

```
composer create-project demontpx/easy-twig

```

Pages
-----

[](#pages)

Assuming your projects runs on the `domain.tld` domain:

- `templates/page/index.html.twig` will be the homepage of the project, accessible through `http://domain.tld/`
- `templates/page/error/404.html.twig` contains the "Not found" error page
- Any template outside `templates/page/` will not be directly accessible for the user and should be used to contain inherited, included and other templates
- Any page inside `templates/page/` will be directly accessible by its name; for example:

TemplateURLcontact.html.twiginformation/about-us.html.twigcontact-us/index.html.twigNote that removing the last slash will try to access `contact-us.html.twig`

Configuration
-------------

[](#configuration)

Check out the `.env` file for configuration settings.

Setting up apache2
------------------

[](#setting-up-apache2)

Set the document root to the `web/` folder. You also might want set `AllowOverride All` and enable `mod_rewrite` for some pretty URLs. Your configuration might look a bit like this:

```

    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot /var/www/website/public

        AllowOverride All

```

Setting up Nginx
----------------

[](#setting-up-nginx)

Configuration might look a bit like this:

```
server {
    server_name domain.tld www.domain.tld;
    root /var/www/website/public;

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ ^/index\.php(/|$) {
        fastcgi_pass unix:/var/run/php-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;

        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;

        internal;
    }
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~624 days

Total

4

Last Release

2341d ago

PHP version history (3 changes)0.1.0PHP &gt;=5.3.3

0.2PHP ^7.1

0.3PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0df11fc03f908635c3a99109be3d1110741e59c1ee71bb4723c006ae4b751a1?d=identicon)[DemonTPx](/maintainers/DemonTPx)

---

Top Contributors

[![DemonTPx](https://avatars.githubusercontent.com/u/2570835?v=4)](https://github.com/DemonTPx "DemonTPx (22 commits)")[![Shivella](https://avatars.githubusercontent.com/u/1641684?v=4)](https://github.com/Shivella "Shivella (4 commits)")

---

Tags

frameworkphptemplatingtwig

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/demontpx-easy-twig/health.svg)

```
[![Health](https://phpackages.com/badges/demontpx-easy-twig/health.svg)](https://phpackages.com/packages/demontpx-easy-twig)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[friendsofsymfony/ckeditor-bundle

Provides a CKEditor integration for your Symfony project.

53014.3M49](/packages/friendsofsymfony-ckeditor-bundle)[symfony/ux-twig-component

Twig components for Symfony

21814.8M161](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1635.6M71](/packages/symfony-ux-live-component)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
