PHPackages                             webkadabra/yii2-docs-module - 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. webkadabra/yii2-docs-module

ActiveYii2-module[Utility &amp; Helpers](/categories/utility)

webkadabra/yii2-docs-module
===========================

Yii2 Documentaiton Viewer Module

2.0.3(6y ago)31921MITPHP

Since Nov 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Webkadabra/yii2-docs-module)[ Packagist](https://packagist.org/packages/webkadabra/yii2-docs-module)[ RSS](/packages/webkadabra-yii2-docs-module/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (1)Versions (4)Used By (0)

yii2-docs-module
================

[](#yii2-docs-module)

Advanced documentation viewer for Markdown or TXT files:

- automatically injects list of pages to index of each folder
- supports multiple languages
- callbacks for custom UI, breadcrumbs etc.

[![](docs/demo.gif)](docs/demo.gif)

### Installation via Composer

[](#installation-via-composer)

You can install package with a command:

> composer require webkadabra/yii2-docs-module

### Example usage with Yii2 Advanced App

[](#example-usage-with-yii2-advanced-app)

Assume the following structure of your applicaiton's folders:

```

  /backend
  /docs
    /user
      /orders
        /fulfillment.md
  /frontend

```

Where `fulfillment.md` is your user documentaiton for (example) "Fulfillment operations". Anyways, add this module to your `backend` config first:

```
// ...
'modules' => [
        // ...
        'docs' => [
            'class' => 'webkadabra\yii\modules\docs\Module',
        ],
        // ...
],
// ...

```

Advanced configuration example (e.g. add breadcrumbs):

```
// ...
'modules' => [
        // ...
        'docs' => [
            'class' => 'webkadabra\yii\modules\docs\Module',
            'layout' => '/docs',
            'on beforeAction' => function ($event) {
                /** @var yii\base\ActionEvent $event */
                Yii::$app->view->params['breadcrumbs'][] = [
                    'label' => Yii::t('app', ucfirst($event->sender->id)),
                    'url' => ['docs/docs/index'],
                ];
                $exs = explode('/', Yii::$app->request->getQueryParam('page'));
                $current = array_pop($exs);
                $path = [];
                foreach ($exs as $ex) {
                    $path[] = $ex;
                    Yii::$app->view->params['breadcrumbs'][] = [
                        'label' => ucwords(str_replace(['/', '_'], ['/', ' '], $ex)),
                        'url' => rawurldecode(\common\helpers\Url::toRoute(
                            [
                                'docs/docs/index',
                                'page' => implode('/', $path),
                            ]
                        )),
                    ];
                }
                Yii::$app->view->params['breadcrumbs'][] = ucwords(str_replace(
                    ['/', '_'],
                    ['/', ' '],
                    $current
                ));
            },
        ],
        // ...
],
// ...

```

Add custom rule in `urlManager` component:

```
// ...
'components' => [
  // ...
    'urlManager' => [
      'rules' => [
        'docs/' => 'docs/docs/index',
      ],
    ],
  ],

```

Now you have your documentaiton available at `http://backend.website.test/docs/user/orders/fulfillment`, and going up a tree structure would bring index of documents in that directory, e.g.: `http://backend.website.test/docs/user/` will bring list of documents in 'docs/user` directory (recursively).

TODO
----

[](#todo)

- Multilanguage support
- Unit tests

Thanks, pull requests are welcome!

- Sergii

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~133 days

Total

3

Last Release

2458d ago

Major Versions

1.0.0 → 2.0.22019-05-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/e4834afa8ce7cd20f03d4da10679a271bc9610d33ce790676f607c197414097c?d=identicon)[Webkadabra](/maintainers/Webkadabra)

---

Top Contributors

[![Webkadabra](https://avatars.githubusercontent.com/u/1168612?v=4)](https://github.com/Webkadabra "Webkadabra (20 commits)")[![GlitchGrp](https://avatars.githubusercontent.com/u/68971660?v=4)](https://github.com/GlitchGrp "GlitchGrp (5 commits)")

---

Tags

documentationyii2modulewiki

### Embed Badge

![Health badge](/badges/webkadabra-yii2-docs-module/health.svg)

```
[![Health](https://phpackages.com/badges/webkadabra-yii2-docs-module/health.svg)](https://phpackages.com/packages/webkadabra-yii2-docs-module)
```

###  Alternatives

[branchonline/yii2-lightbox

Lightbox widget for Yii2

13139.0k1](/packages/branchonline-yii2-lightbox)[akiraz2/yii2-ticket-support

Yii2 Support Ticket Module, easy, flexible, fast

611.7k](/packages/akiraz2-yii2-ticket-support)

PHPackages © 2026

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