Gen is a lightweight, extensible static file generator.

1.0.0 2016-07-20 10:54 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:26:12 UTC


README

Build Status StyleCI

Gen produces static files from a range of different sources including plain text, HTML, markdown and Twig. You may also write your own extensions to fulfil your specific requirements. Check out the documentation.

Example Code

Here's some sample code to show what Gen looks like in action:

$gen = new Gen\App($config);
$publisher = $gen->getPublisher();
$publisher->page('index.md', function($page, $layout) {
    $layout->header = 'Welcome to Gen';
    $layout->subHeader = 'Gen is a lightweight, extensible static file generator written in PHP';
    $page->setRenderer(new Gen\Renderer\ParsedownRenderer());
});
$gen->run();

Installation

Skeleton Project (recommended)

With composer create-project:

composer create-project jamesmcfadden/gen-skeleton my-gen-project

The skeleton project can be found at github.com/jamesmcfadden/gen-skeleton.

Bare bones

Install with composer:

composer require jamesmcfadden/gen dev-master

You'll probably need the documentation.

Documentation & Examples

Documentation and examples can be found at gen.jamesmcfadden.co.uk.