πŸ’‹Kiss

Keep It Simply Static

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