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.

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