PHP 8.5 · WebAssembly · zero server
Fold PHP into flat HTML.
A guided tour of Kirigami — a zero-dependency static site generator that compiles PHP templates to plain HTML.
What you get
Every page is just PHP that runs once
Kirigami compiles the templates below to dependency-free static HTML. Each card is a real page in this site — open one to see the feature and its source side by side.
Content
Markdown
A GFM Markdown engine with tables, footnotes, alerts and shortcode plugins — usable from a tag, a data file or PHP.
Open →
Assets
Images
One image autogenerator, three surfaces. Resize, crop and sample palettes with no native dependency anywhere.
Open →
Docs
Code
Fenced code blocks with language classes, ready for a highlight plugin, with a copy button bolted on in ~15 lines of JS.
Open →
Content
Data files
Point a PHPDOC annotation at a YAML or JSON file and get structured data — or fetch it over the network at build time.
Open →
Extend
Tags & hooks
Register your own HTML tags, Markdown shortcodes and render-pipeline hooks from a single includes file.
Open →
The whole build
One config file, one command
# kirigami.yaml
kirigami:
project: Kirigami Demo
baseurl: https://php-kirigami.github.io/template-demo
root: src
prepros:
before: _layout/header.php
after: _layout/footer.php
includes: [_lib/functions.php]
tasks:
- { name: js-core, type: esbuild, entry: scripts/kirigami.core.js }
- { name: css-core, type: sass, entry: styles/kirigami.core.scss }
$ npx kiri build # dev build — every task once
$ npx kiri watch # rebuild on change (no server)
$ npx kiri export # production build into dist/
Zero deps
No PHP install
No headless browser