jhancock/yii2-markdown-docs

Yii2 markdown documentation module

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 2

Open Issues: 0

Type:yii2-extension

pkg:composer/jhancock/yii2-markdown-docs

dev-master 2015-08-27 20:32 UTC

This package is not auto-updated.

Last update: 2025-10-11 23:27:38 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist jhancock/yii2-markdown-docs "*"

or add

"jhancock/yii2-markdown-docs": "*"

to the require section of your composer.json file.

Configuration

Enable the module in your confguration:

'modules' => [
    'docs' => [
        'class' => 'jhancock\markdowndocs\Module',
        // Optional, defaults to cebe\markdown\GithubMarkdown
        'parserClass' => 'cebe\markdown\GithubMarkdown'
    ],
],

Add a rule to your url manager component:

'urlManager' => [
    'enablePrettyUrl' => true,
    'showScriptName'  => false,
    'rules' => [
        ...
        [
            'pattern'      => 'docs<page:.+>',
            'route'        => 'docs/default/view',
            'encodeParams' => false
        ],
        ...
    ],
],

Your documentation would then be accessible under your application's /docs URL.

Usage

This module assumes your documentation lives under the @app/docs alias.