miolae/yii2-markdown-doc
Composer 安装命令:
composer require miolae/yii2-markdown-doc
包简介
Yii2 module to write documentation with MarkDown files
关键字:
README 文档
README
Yii2 module to display the content of all markdown file in a directory and its sub-folder.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist "miolae/yii2-markdown-doc" "2"
or add
"miolae/yii2-markdown-doc": "2"
to the require section of your composer.json file.
Configure
- Configure the module in config/web.php as follows
'modules' => [ ////////////////// 'doc' => [ 'class' => 'miolae\yii2\doc\Module', // Directory to list 'rootDocDir' => '@app/docs', // set false if you don't want to cache generated html, useful for debugging 'cache' => true, // Prefix for browser title, i.e: Documentation: Page Title 'titlePrefix' => 'Documentation:', ], ////////////////// ],
- Add
miolae\yii2\doc\controllers\DefaultControllereither tocontrollerMapor tourlManager. Example for url manager with pretty url enabled:
'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ '/doc/<page:[\w\/-\#]+>' => 'doc/default/index', '/doc' => 'doc/default/index', ], ],
Usage
- Add
README.mdto yourdocsdirectory (or other one you specified inrootDocDiroption) - To access the doc, go to http://yoursite.com/doc/
统计信息
- 总下载量: 6.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-19