PHPackages                             rafie/gdoc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rafie/gdoc

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rafie/gdoc
==========

Documentation generator.

012PHP

Since Mar 14Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Whyounes/gdoc)[ Packagist](https://packagist.org/packages/rafie/gdoc)[ RSS](/packages/rafie-gdoc/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

\##Documentation Generator API documentation is important, but an official documentation for your application project is also important. I tried to adapt the [Sami documentation generator](https://github.com/FriendsOfPHP/Sami) to help generate official documentation.

\##Installation You can require [rafie/gdoc](https://packagist.org/packages/rafie/gdoc) in your `composer.json`and do a `composer update`.

\##Usage You can run the documentation generator from the command line.

```
$ php path/to/rafie.php generate your_config.php
```

Where the config file must return an instance of `RAFIE\Configuration`, you may use the config file inside the root of the package, this is an example.

```
use RAFIE\Configuration;
use Symfony\Component\Finder\Finder;

$dir = __DIR__ . '/doc';

$finder = Finder::create()->files()->in($dir);

$docConf = $dir.'/doc.yml';

$options = [
    'theme'       => 'laravel',
    'build_path'  => __DIR__ . '/build',
    'themesPaths' => [__DIR__ . '/src/themes/']
];

return new Configuration($finder, $docConf, $options);
```

You can use the [Finder](http://symfony.com/doc/current/components/finder.html) to lookup your markdown documentation. The `$docConf` can be used to describe your documentation navigation structure and it will parsed and passed to your theme file, for example, if you wanted to create the [Laravel documentation](http://laravel.com/docs/5.0) structure.

```
navigation:
  Prologue:
    Releases Notes: releases.html
    Upgrade Guide: upgrade.html
    Contribution Guide: contributions.html
  Setup:
    Installation: installation.html
    Configuration: configuration.html
    ...
```

The options parameter specify three attributes, your theme name, themes paths (where you stored your themes), and the build path where you output the result.

\##Using Git You can use versioned documentation by specifying a fourth option.

```
$dir = __DIR__ . '/doc';

$finder = Finder::create()->files()->in($dir);

$versions = RAFIE\Version\GitVersionCollection::create($dir)
    ->add('master', 'Master')
    ->add('4.2', '4.2');

$options = [
    'theme'       => 'laravel',
    'build_path'  => __DIR__ . '/build/%version%',
    'versions'    => $versions,
    'themesPaths' => [__DIR__ . '/src/themes/']
];

$docConf = $dir . '/doc.yml';

return new Configuration($finder, $docConf, $options);
```

The `GitVersionCollection` lets you specify which versions you want to use for the generation, and the result is passed as an option. Note that the build path contains a `%version%` which indicates the sub directory structure used for the output.

\##Creating Themes You can this Github [repository](https://github.com/Whyounes/gDocThemes) to learn more about theme.

\##Demo The [gDocDemo](https://github.com/Whyounes/gDocDemo) repository contain a demo for generating a documentation for Laravel framework, I'm using their CSS file and some of their HTML.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e77e863a88494fe41ab35f0d3fa40d08172040ea801aa558672af608da4e1e1?d=identicon)[Whyounes](/maintainers/Whyounes)

---

Top Contributors

[![Whyounes](https://avatars.githubusercontent.com/u/1175548?v=4)](https://github.com/Whyounes "Whyounes (8 commits)")

### Embed Badge

![Health badge](/badges/rafie-gdoc/health.svg)

```
[![Health](https://phpackages.com/badges/rafie-gdoc/health.svg)](https://phpackages.com/packages/rafie-gdoc)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
