Overview

PHPoole is a CLI that merge documents and templates to build a static Website.

Requirements

To create a new website, requirements are:

  1. PHP 5.6 or 7+
  2. PHPoole CLI
  3. A configuration file
  4. Plain text documents (written in Markdown)
  5. Twig templates

Organize files

.
├─ 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 (ie: a Section)
|  |  └─ 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

Create a configuration file

Example:

site:
    title: PHPoole
    baseline: PHPoole is a light and easy static website generator!
    baseurl: http://phpoole.org/
    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    language: en

Build the website

Just run the following command at the root of the Website:

phpoole build

See result

To see the result in a Web browser, run:

phpoole serve --browser

By default, the static website is created in the ./_site directory:

./_site
├─ 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