Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,63 @@ The recommended way to install this extension is using [Composer](http://getcomp

If you do not have a "composer.local.json" file yet, create one and add the following content to it:

```
```json
{
"require": {
"mediawiki/mermaid": "~6.0.1"
}
},
"extra": {
"merge-plugin": {
"include": [
"extensions/*/composer.json",
"skins/*/composer.json"
]
}
}
}
```

If you already have a "composer.local.json" file add the following line to the end of the "require"
section in your file:

"mediawiki/mermaid": "~6.0.1"
```json
"mediawiki/mermaid": "~6.0.1"
```

Remember to add a comma to the end of the preceding line in this section.

### Step 2

Run the following command in your shell:

php composer.phar update --no-dev
```shell
php composer.phar update --no-dev
```

### Step 3

Add the following line to the end of your "LocalSettings.php" file:

wfLoadExtension( 'Mermaid' );

```php
wfLoadExtension( 'Mermaid' );
```

## Configuration

One configuration parameter is provided allowing to choose the basic theme for rendering diagrams and charts.
By default the rendering is set to use the `forest` theme:

$mermaidgDefaultTheme = 'forest';
```php
$mermaidgDefaultTheme = 'forest';
```

If one would like to use one of the other themes provided (`default`, `neutral` or `dark`) the configuration
parameter can be set to it after invoking the extension, e.g.:

wfLoadExtension( 'Mermaid' );
$mermaidgDefaultTheme = 'neutral';
```php
wfLoadExtension( 'Mermaid' );
$mermaidgDefaultTheme = 'neutral';
```

[readme]: https://github.com/SemanticMediaWiki/Mermaid/blob/master/README.md
[release notes]: https://github.com/SemanticMediaWiki/Mermaid/blob/master/docs/RELEASE-NOTES.md
Expand Down
Loading