A markdown based documentation

dev-master / 0.1.x-dev 2016-09-27 01:48 UTC

This package is auto-updated.

Last update: 2023-01-15 02:59:48 UTC


A template, the converts markdown .md files into well static html page, depending on the theme you will use.


The Factory

We have a factory that handles combines all the processes and calls the themes you need.


Just a map for our markdowns.

$map = [
    'Prologue' => [
        'Setup' => __DIR__.'/docs/prologue/',
        'Change Log' => __DIR__.'/docs/prologue/',


You can freely pass a variable in the factory. Please take a note that this variables will be over-written/added a new variable when you will be using a different theme.

$view_variables = [
    'uri' => '',
    'title' => 'My Documentation',
    // and so on ...

Finally to call the factory, Please take a note that the below code is still incomplete, that we still need to review how the theme works.


$map = [...];
$view_variables = [...];

$factory = new PhpPure\Themer\Factory($map, $theme_variables, $view_variables);


We're using Laravel's Blade Component to handle the views.

PHP Pure has a theme that we could use for documentation, and that is the basic template that we added in the core.

$basic = new PhpPure\Themer\Themes\Basic\Basic;

The above code, we instantiated the Basic class, we set the views folder, and also the cache folder.

The Basic Theme requires us to inject a theme variables in the factory, we must inject the extension and landing_page.

$theme_variables = [
    'extension' => 'html',
    'landing_page' => $map['Prologue']['Setup'],

To finalize the factory, check code below.


$factory->generate('public/'); // the folder to generate with


We have a sample tests that your could try out or mimic.

Writing your own Theme

I can't write everything here, so maybe let's move on to our wiki.