jhancock / yii2-markdown-docs
Yii2 markdown documentation module
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-12-21 19:37:09 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.