The PHP 8 compatible version of a very easy to use Static Site Generator (SSG) in PHP - Markdown - Twig
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.
sitebuilder_php8.phar file in the directory where you want to create your websitephp sitebuilder_php8.phar init to create the structure of the site/content (subdirectories are accepted) and your templates (in TWIG) in /templatesphp sitebuilder_php8.phar rebuild to generate the html from your content, the generated site will be in /output/output to your serverYou 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
Site-Builder will therefore use /template/indexdouance.twig where there is just where desired:
<div class="sommaireIndex">
{{ content | raw }}
</div>