Get Started

Pages is a lightweight PHP utility to build documentation.

You may use CLI utility or require library files in your project.

Run it in console:

php vendor/bin/parser.php \
    --docs-dir=/path/to/docs \
    --dist-dir=/path/to/dist \
    --code-highlight-languages=php,javascript \
    --plugins=code

Or put it directly in your project:

use Bologer\Pages;
use Bologer\Config;

$config = new Config();
$config->docsFolder = __DIR__ . '/docs';
$config->distFolder = __DIR__ . '/dist';
$config->codeHighlightLanguages = ['html', 'php', 'javascript'];
$config->plugins = ['code'];
$pages = new Pages($config);
$pages->build();

Installing Pages

The recommended way to install Pages is through Composer.

composer require bologer/pages

Goal

You may say that this is yet another utility which builds documentation. Yes it is, but it is much simpler and lightweight then what you've seen before.

I find it very frustrating to have so many versions of tools to build great documentation, but all of them are difficult to use, SaaS projects or lack functionality.

What do we care the most when we write documentation?

  • you want to make sure it is easy to read
  • you want to have code highlighting
  • you want it to look good (visually)

Alright, writing something is already hard, so why should you care about the rest?

At this point I decided to create this utility to simplify the process of writing documentation. So developer, can focus on writing good documentation and this tool to do the rest.

The idea is that you use this as a library, configure it to you needs and easily build documentation.

You can easily pack generated content and put it to public domain.