PHPackages                             projektmotor/documentationbundle - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. projektmotor/documentationbundle

ActiveSymfony-bundle[Parsing &amp; Serialization](/categories/parsing)

projektmotor/documentationbundle
================================

Symfony2 markdown based documentation bundle

v0.2.7(10y ago)181[1 issues](https://github.com/projektmotor/DocumentationBundle/issues)PHP

Since Aug 18Pushed 10y ago4 watchersCompare

[ Source](https://github.com/projektmotor/DocumentationBundle)[ Packagist](https://packagist.org/packages/projektmotor/documentationbundle)[ RSS](/packages/projektmotor-documentationbundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (12)Used By (0)

PmDocumentationBundle
=====================

[](#pmdocumentationbundle)

Symfony2 Bundle to build simple Markdown based documentations (thanks to [KnpMarkdownBundle](https://github.com/KnpLabs/KnpMarkdownBundle) &amp; [KnpMenuBundle](https://github.com/KnpLabs/KnpMenuBundle)).

Markdown syntax: [cheatsheet](https://guides.github.com/features/mastering-markdown)

Features
--------

[](#features)

- filesystem based for simple handling (create markdown-file, request uri, ready!)
- generate menus (KnpMenu) by simply parsing a toc-file (table of content)
- link rewriting: links could be written absolute to documentation root, bundle rewrites these links to be accessable by public urls
- image url rewriting: bundle is publishing the images to the configured path and rewrites urls, similar to links

Dependencies
------------

[](#dependencies)

- [KnpMarkdownBundle](https://github.com/KnpLabs/KnpMarkdownBundle)
- [KnpMenuBundle](https://github.com/KnpLabs/KnpMenuBundle)

Install
-------

[](#install)

- Install package via composer:

```
...
"projektmotor/documentationbundle" : "~0.1",
...
```

- Activate in AppKernel:

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // activate bundle in AppKernel
        new Pm\DocumentationBundle\PmDocumentationBundle(),

        // if not yet done
        new Knp\Bundle\MenuBundle\KnpMenuBundle(),
        new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(),
    );
}
```

- Include routing:

```
# e.g. app/config/routing.yml
pm_documentation:
    resource: "@PmDocumentationBundle/Resources/config/routing.yml"
    prefix:   /documentation
```

- **OPTIONAL** - Set documentation root dir &amp; template (if you do not want to use the default path):

```
# e.g. app/config/config.yml
pm_documentation:
    doc_path:   '/path/to/doc'
    image_dest: '/web/images/doc'
    view:       'AppBundle::layout.html.twig'
```

- NOTE: the template (view) MUST CONTAIN a block called *content* where the parsed markdown is rendered in.
- NOTE: image destination path must be writeable by the web server user (e.g. www-data)

Usage
-----

[](#usage)

### Directory Structure

[](#directory-structure)

- let`s say your documentation-root is at **/my/doc**
- first level subdirectories divide different languages from each other
    - /my/doc/en
    - /my/doc/de
    - ...
- every dir behind the language-dirs **MUST** contain an **index.md** (see [Requesting a Page](#requesting-a-page))
- /my/doc/en/index.md
- /my/doc/en/chapter\_1/index.md
- ...
- the language-dirs **SHOULD** contain a **toc.md** (depending on your need of a menu)
- /my/doc/en/toc.md
- /my/doc/de/toc.md
- ...

### Requesting a Page

[](#requesting-a-page)

Assuming you want to render the markdown file `/path/to/doc/en/chapter_1/first-steps.md` in your browser, just call `http://example.com/documentation/en/chapter_1/first-steps`.

Structure:

- `documentation` : the route prefix (could be set in routing)
- `en` : the locale
- `chapter_1/first_steps` : path to markdown file

If you request a folder instead of specific markdown-file, the `index.md` file of the folder is used. Requesting `http://example.com/documentation/en/chapter_1` would end up in rendering the `/path/to/doc/en/chapter_1/index.md`

### Including the (Sub-) Menu:

[](#including-the-sub--menu)

- inject menu helper to you Knp MenuBuilder:

```
services:
    app.menu_builder:
        class: AppBundle\Menu\MenuBuilder
        arguments:
            - @knp_menu.factory
            - @pm_documentation.menu_helper
```

```
class MenuBuilder
{
    private $menuBuilderHelper;

    public function __construct(FactoryInterface $factory, MenuBuilderHelper $subMenuBuilder)
    {
        $this->factory = $factory;
        $this->menuBuilderHelper = $subMenuBuilder;
    }
}
```

- add menu (based on toc.md)

```
class MenuBuilder
{
  // ....
  public function createMainMenu(RequestStack $requestStack)
  {
      $menu = $this->factory->createItem('root');

      // adding documentation menu as submenu
      $menu->addChild('Documentation', array(...));
      $this->subMenuBuilder->buildDocumentationMenu($menu['Documentation']);

      // OR adding as first-level menu
      $this->subMenuBuilder->buildDocumentationMenu($menu);
  }

  // ....
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~25 days

Recently: every ~48 days

Total

11

Last Release

3673d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92e61c56f93da57ee92c00c6b0576b42d29deaa5c4e839ae75d2af60ae470951?d=identicon)[projektmotor](/maintainers/projektmotor)

---

Top Contributors

[![soeren-helbig](https://avatars.githubusercontent.com/u/1651135?v=4)](https://github.com/soeren-helbig "soeren-helbig (3 commits)")

---

Tags

phpsymfonysymfony-bundledocumentationmarkdownmenu

### Embed Badge

![Health badge](/badges/projektmotor-documentationbundle/health.svg)

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

###  Alternatives

[justinwalsh/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

4.6k38.1k1](/packages/justinwalsh-dauxio)[daux/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

825191.0k1](/packages/daux-dauxio)[bookdown/bookdown

Provides DocBook-like rendering of Markdown files.

8257.6k16](/packages/bookdown-bookdown)[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)[georgringer/doc

Render documentation based on markdown files directly in the backend

2232.7k](/packages/georgringer-doc)[dudo1985/wpdocgen

Documentation Generator for WordPress.

2327.6k](/packages/dudo1985-wpdocgen)

PHPackages © 2026

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