SiteGenerator
A simple static site generator., (*1)
Installation
Create composer.json for installing via composer., (*2)
{
"require": {
"kohkimakimoto/site-generator": "dev-master"
}
}
Run composer install command., (*3)
$ composer install
Usage
Run init command to create a basic directory structure and generator.yml., (*4)
$ php vendor/bin/site init
Created directory structure is the following, (*5)
.
โโโ dest # Root directory contains generated site resouces.
โโโ source # Root directory contains source files of site.
โย ย โโโ helpers # Helpers contains PHP files are difined some user functions.
โย ย โโโ layouts # Layouts contains layout files.
โย ย โโโ public # Public is simply copied to dest directory.
โย ย โโโ views # Views is processed to output files to dest directory.
โโโ generator.yml # Main configuration file.
Run generate command to generate a static site from a source., (*6)
$ php vendor/bin/site generate
Also, you can run generate command with --watch and --server options in the development stage., (*7)
$ php vendor/bin/site generate --watch --server
If you use --server option, You can see the site at http://localhost:1234/., (*8)
If you want to clear the dest directory, you should run clear command., (*9)
$ php vendor/bin/site clear
TODO
- Supporting to generate asset files.
References
It's inspired the following products., (*10)