PHILIPPE GOUILLOU

SITE-BUILDER FOR PHP 8

The PHP 8 compatible version of a very easy to use Static Site Generator (SSG) in PHP - Markdown - Twig

DOWNLOAD Github

This is a version compatible with PHP 8 of Site-builder by Matt Robinson (mattattui) and Edouard (inouire), the very easy to use Static Site Generator (SSG) that I use since many years for Douance.org and Evopsy.com.

The conversion has been done 100% by Claude Sonnet 4.6 on 21st of February, 2026, directly from the .phar file.

No other modification has been done.

Installation and use

  1. Download latest release of sitebuilder_php8.phar
  2. Put the sitebuilder_php8.phar file in the directory where you want to create your website
  3. In this directory, run php sitebuilder_php8.phar init to create the structure of the site
  4. Create your markdown files in /content (subdirectories are accepted) and your templates (in TWIG) in /templates
  5. Run php sitebuilder_php8.phar rebuild to generate the html from your content, the generated site will be in /output
  6. Upload (FTP) the content of /output to your server

Examples

YAML in Markdown file

You can indicate the template used by each page in the YAML block (at the beginning of the markdown file in /content) by indicating its name.

For example, output/ndex.html (homepage of Douance) is generated from /content/index.md using the dedicated template /template/indexdouance.twig. This is indicated in the YAML block:

---
title: Index  
author: Gouillou  
categories:  
tags:  
date: 1996 - MàJ : 21 janvier 2026
image:  
url: https://douance.org/index.html  
excerpt: Partie Historique de la homepage   
template: indexdouance.twig  
published: '1996'  
modified: '2026-01-21'  
---

Content in Markdown format

Template

Site-Builder will therefore use /template/indexdouance.twig where there is just where desired:

<div class="sommaireIndex">
    {{ content | raw }}
</div>

More information on Github

DOWNLOAD Github