<commit_before># Yii2 Markdown docs

## Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist petrleocompel/yii2-markdown-docs "*"
```
or run

```
composer require petrleocompel/yii2-markdown-docs
```

or add

```
"petrleocompel/yii2-markdown-docs": "*"
```

to the require section of your `composer.json` file.

## Configuration

Enable the module in your confguration:

```
'modules' => [
    'docs' => [
        'class' => 'petrleocompel\yii2\markdowndocs\Module',
        // You can set custom parserClass
        //'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.

### Make doc
Under `@app/docs` you should make your md files. You dont have to create listing its automatic.

#### Titles of doc
On every 1 line of file should be `#` means Heading 1<commit_msg>Doc fix<commit_after># Yii2 Markdown docs

## Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist petrleocompel/yii2-markdown-docs "*"
```
or run

```
composer require petrleocompel/yii2-markdown-docs
```

or add

```
"petrleocompel/yii2-markdown-docs": "*"
```

to the require section of your `composer.json` file.

## Configuration

Enable the module in your confguration:

```
'modules' => [
    'docs' => [
        'class' => 'petrleocompel\yii2\markdowndocs\Module',
        // You can set custom parserClass
        //'parserClass' => 'cebe\markdown\GithubMarkdown'
    ],
],
```

### Routing

Add a rule to your url manager component:

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

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

> You can change this url but if your `@app` is your `@webroot` then if you will change it to `/docs` there could be collision.
 
So for compatibility i recommend to use `/doc`

## Usage

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

### Make doc
Under `@app/docs` you should make your md files. You dont have to create listing its automatic.

#### Titles of doc
On every 1 line of file should be `#` means Heading 1
{'fraction_non_alphanumeric': 0.13898191560616208, 'fraction_numerical': 0.004688546550569324, 'mean_word_length': 2.8691709844559585, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1230179', 'n_tokens_mistral': 979, 'n_tokens_neox': 929, 'n_words': 293}