PHPackages                             phpillip/phpillip - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpillip/phpillip

Abandoned → [stenope/stenope](/?search=stenope%2Fstenope)Library[Utility &amp; Helpers](/categories/utility)

phpillip/phpillip
=================

PHP Static Site Generator

v1.0.5(10y ago)261642[3 issues](https://github.com/Phpillip/phpillip/issues)1MITPHPPHP &gt;=5.6

Since Oct 1Pushed 9y ago3 watchersCompare

[ Source](https://github.com/Phpillip/phpillip)[ Packagist](https://packagist.org/packages/phpillip/phpillip)[ Docs](http://phpillip.github.io/)[ RSS](/packages/phpillip-phpillip/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (10)Versions (8)Used By (1)

[![](https://camo.githubusercontent.com/e8ce0b31167b1bfffa9a5863aca0013ab1fd2e2b3598dde1244005e7dd36e449/687474703a2f2f706870696c6c69702e6769746875622e696f2f706870696c6c69702e737667)](https://camo.githubusercontent.com/e8ce0b31167b1bfffa9a5863aca0013ab1fd2e2b3598dde1244005e7dd36e449/687474703a2f2f706870696c6c69702e6769746875622e696f2f706870696c6c69702e737667)
=========================================================================================================================================================================================================================================================================================================================================================================

[](#)

> Phpillip is [Hugo](https://gohugo.io/)'s cousin.

What
----

[](#what)

Phpillip is static website generator written in PHP and powered by [Silex](http://silex.sensiolabs.org/) and [Symfony components](http://symfony.com/doc/current/components/index.html).

It basically dumps your Silex application to static HTML files in a `/dist` folder.

The result directory is meant to be served by an HTTP Server like [apache](http://apache.org) and [nginx](http://www.nginx.com) or published to static website services like [Github Pages](https://pages.github.com/).

*It's particularly fit for **blogging**, **documentation** and **showcase**.*

How
---

[](#how)

Phpillip is a [Silex](http://silex.sensiolabs.org/) application.

The **build process**:

- Loop through all declared *routes* in the Application
- Load content associated with the route (if any) from file
- Call each route with its content in a *Request*
- Dump the *Response* content in a file

It supports as many format as you need.

It uses the powerful [Twig](http://twig.sensiolabs.org/) engine for templating.

Why
---

[](#why)

Phpillip is meant to be:

- Highly **extensible**
- Friendly with **Symfony** developers
- Clear, simple and clean

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

[](#getting-started)

Get your static website:

1. Bootstrap a Phpillip project
2. Write your content
3. Declare your routes and controllers
4. Provide templates
5. Build the static website

### 1. Bootstrap

[](#1-bootstrap)

To bootstrap a new [Phpillip](https://github.com/Phpillip/phpillip) project:

```
composer create-project phpillip/phpillip-standard my_app
cd my_app
```

### 2. Write content

[](#2-write-content)

Write your content file `[my-content-slug].[format]` in `src/Resources/data/[my-content-type]/`:

**Example** `src/Resources/data/article/why-use-phpillip.md`:

```
---
title: Why use Phpillip?
---

# Why use Phpillip

Why not!

```

### 3. Declare routes and controllers

[](#3-declare-routes-and-controllers)

Phpillip is a Silex application, so you can declare a route and its controller [the same way you would in Silex](http://silex.sensiolabs.org/doc/usage.html#routing):

A closure:

```
$this->get('/', function () { return []; })->template('index.html.twig');
```

Your own controller class in 'src/Controller':

```
$this->get('/blog', 'Controller\\BlogController::index');
```

A controller service (here the Phpillip content controller service):

```
$this->get('/blog/{post}', 'content.controller:show')->content('post');
```

Phpillip gives you [many helpers](doc/feature/helpers.md) to automate content loading for your routes.

### 4. Provide templates

[](#4-provide-templates)

Write the Twig templates corresponding to your routes and controllers in `src/Resources/views/`

If you use the default Phpillip routes and controller, you'll need to provide:

The list template:

- *File:* `[my-content-type]/index.html.twig`.
- *Variables:* An array of contents, named `[content-type]s`.

```
{% extends 'base.html.twig' %}
{% block content %}
    {% for article in articles %}

            {{ article.title }}

    {% endfor %}
{% endblock %}
```

The single content page template:

- *File:* `[my-content-type]/show.html.twig`.
- *Variables:* The content as an associative array, named `[content-type]`.

```
{% extends 'base.html.twig' %}
{% block content %}
    {{ article.content }}
{% endblock %}
```

### 5. Build

[](#5-build)

Build the static files to `/dist` with the Phpillip build command:

```
bin/console phpillip:build

```

[![](https://camo.githubusercontent.com/1c9f2b5cf2ad1a7852bff0c847810ddd4363ceab9bb2e0e361cafab17b7d8392/687474703a2f2f706870696c6c69702e6769746875622e696f2f6275696c642e676966)](https://camo.githubusercontent.com/1c9f2b5cf2ad1a7852bff0c847810ddd4363ceab9bb2e0e361cafab17b7d8392/687474703a2f2f706870696c6c69702e6769746875622e696f2f6275696c642e676966)

You're done!

Going further:
--------------

[](#going-further)

About Phpillip's **features**:

- [Helpers: Param Converters and other route shortcuts](doc/feature/helpers.md)
- [Sitemap](doc/feature/sitemap.md)

About **content**:

- [Supported formats](doc/content/formats.md)
- [Markdown](doc/content/markdown.md)
- [Retrieving content](doc/content/retrieving-content.md)
- [Property handlers](doc/content/property-handlers.md)

About **controllers**:

- [Phpillip's default content controller](doc/controller/content.md)
- [Custom controller classes](doc/controller/custom.md)
- [Specifying output format](doc/controller/format.md)
- [Template Resolution](doc/controller/template.md)

About the **console**:

- [Phpillip's Console](doc/console/commands.md)

Contribution
------------

[](#contribution)

Any kind of [contribution](doc/more/contribution.md) is very welcome!

Directory structure
-------------------

[](#directory-structure)

```
# Sources directory
src/
    # Your Silex Application in which your declare routes, services, ...
    Application.php

    # Your controller classes (optional)
    # This is only a recommandation, you can put controllers wherever you like
    /Controller
        MyController.php

    # Resources
    /Resources

        # Configuration files directory
        config/
            # Phpillip configuration
            config.yml

        # Content directory
        data/
            # Create a directory for each content type
            post/
                # Your 'post' contents goes here
                my-first-post.md
                a-post-in-json.json

        # Public directory
        public/
            # All public directory content will be exposed in 'dist'
            css/
                style.css

        # Views directory
        views/
            # Your twig templates
            base.html.twig
            blog/
                index.html.twig
                show.html.twig

# Destination directory
dist/
    # The static files will be dumped in here

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.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 ~22 days

Total

6

Last Release

3772d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e4d0789a5e5af7d70bc34a8afbcafde6ecbe03649eeaee631534759f7d848e2?d=identicon)[Tom32i](/maintainers/Tom32i)

---

Top Contributors

[![Tom32i](https://avatars.githubusercontent.com/u/1846873?v=4)](https://github.com/Tom32i "Tom32i (53 commits)")[![woecifaun](https://avatars.githubusercontent.com/u/5421942?v=4)](https://github.com/woecifaun "woecifaun (3 commits)")

### Embed Badge

![Health badge](/badges/phpillip-phpillip/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

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

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[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)[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)
