Quick Start

PHPoole is a CLI application that merge plain text files (written in Markdown), images and Twig templates to generate a static website.


You can download phpoole.phar with the following command from your terminal:

curl -SOL https://phpoole.org/phpoole.phar

Or donwload it from the Download section.

Then, you can install phpoole globally:

mv phpoole.phar /usr/local/bin/phpoole
chmod +x /usr/local/bin/phpoole

PHP 7.1+ is required.

Create a new website

phpoole new <mywebsite>

To build and serve the website, just run the following command at the root:

phpoole serve

All commands

build    Build the website
help     Get help for individual commands
list     List website pages
new      Create a new website
serve    Start the built-in web server
version  Display the version of the script


The website configuration is stored in a YAML file named phpoole.yml:


    title: PHPoole
    baseline: An easy and lightweight static website generator.
    baseurl: https://phpoole.org/
    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    language: en

Organize files

Files tree is organized like the following:

├─ content               <- Contains text (Mardown) files
|  ├─ blog                 <- A Section named "Blog"
|  |  ├─ post-1.md         <- A Page in the "Blog" section
|  |  └─ post-2.md         <- Another Page in the "Blog" Section
|  ├─ project              <- A Section named "Project"
|  |  └─ project-1.md      <- A Page in the "Project" Section
|  └─ about.md             <- A Page in the root
├─ layouts               <- Contains Twig templates
|  ├─ _default             <- Contains default templates
|  |  ├─ list.html.twig    <- Used by a "list" node type
|  |  └─ page.html.twig    <- Used by the "page" node type
|  └─ index.html.twig      <- Used by the "homepage" node type
├─ static                <- Contains static files
|  └─ robots.txt           <- A static file
└─ phpoole.yml           <- Configuration file

Templates and theming

PHPoole's layouts are Twig templates stored in the layouts directory (by default).

More details about template customization are available in the layouts section of the documentation.


By default, the static website is created in the _site directory and can be published as is.


├─ blog
|  ├─ post-1
|  |  └─ index.html
|  ├─ post-2
|  |  └─ index.html
|  └─ index.html
├─ project
|  ├─ project-1
|  |  └─ index.html
|  └─ index.html
├─ about
|  └─ index.hml
├─ index.html
└─ robots.txt
Suggest a modification Next