Documentation
Installation
Via Composer (global) :
composer global require amund/kiss-php
kiss init my-site
cd my-site
kiss build
Via PHAR (no Composer needed) :
curl -LO https://github.com/amund/kiss-php/releases/latest/download/kiss.phar
chmod +x kiss.phar
./kiss.phar init my-site
cd my-site
./kiss.phar build
To be able to just type kiss, move it somewhere in your path, for example :
curl -LO https://github.com/amund/kiss-php/releases/latest/download/kiss.phar
chmod +x kiss.phar
mv kiss.phar ~/.local/bin/kiss
kiss init my-site
cd my-site
kiss build
Default project structure
kiss.yml β Site configuration
βββ copy/ β Static files (copied as-is to web/)
βββ data/ β Global data (YAML/JSON/PHP/XML/INI/MD)
βββ route/ β Route definitions (YAML/JSON/PHP)
βββ template/ β Twig templates
βββ web/ β Generated site (dist)
These directories are the default ones, but they can be changed in the configuration file.
Configuration file
Supported formats : YAML, JSON, PHP, XML, INI.
cache: system - system is not actually a directory; the value system is replaced with a unique directory within the system directory (e.g., /tmp/kiss/[project-hash]/). Any other value will be treated as a directory.
debug: true
path:
copy: copy
data: data
route: route
template: template
dist: web
cache: system
{
"debug": true,
"path": {
"copy": "copy",
"data": "data",
"route": "route",
"template": "template",
"dist": "web",
"cache": "system"
}
}
<?php
return [
'debug' => true,
'path' => [
'copy' => 'copy',
'data' => 'data',
'route' => 'route',
'template' => 'template',
'dist' => 'web',
'cache' => 'system',
],
];
<?xml version="1.0"?>
<root>
<debug>true</debug>
<path>
<copy>copy</copy>
<data>data</data>
<route>route</route>
<template>template</template>
<dist>web</dist>
<cache>system</cache>
</path>
</root>
debug = true
[path]
copy = copy
data = data
route = route
template = template
dist = web
cache = system
Environment variables
KISS_DEBUG=true- Set Twig to debug mode, enabling the use ofdump()KISS_VERBOSE=true- Add debug information to the consoleKISS_BASE_URL=""- used internally to deploy on a subfolder