2017 © Pedro Pelรกez
 

library site-generator

A simple static site generator.

image

kohkimakimoto/site-generator

A simple static site generator.

  • Saturday, February 22, 2014
  • by kohkimakimoto
  • Repository
  • 1 Watchers
  • 2 Stars
  • 81 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

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)

The Versions