jamesmcfadden / gen
Gen is a lightweight, extensible static file generator.
1.0.0
2016-07-20 10:54 UTC
Requires
- php: >=5.5.9
- erusev/parsedown: ^1.6
- symfony/console: 3.1.*
- twig/twig: ~1.0
Requires (Dev)
- mikey179/vfsstream: 1.6.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2025-01-04 21:19:25 UTC
README
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.