-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Compatibility with python3 (return str instead of unicode) - Update and complete the README.md
- Loading branch information
Laurent Franceschetti
committed
Apr 15, 2020
1 parent
abf1439
commit bb41868
Showing
3 changed files
with
55 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,66 @@ | ||
# mkdocs-markdownextradata-plugin | ||
|
||
A MkDocs plugin that render meraid graph to mermaid style | ||
A MkDocs plugin that renders mermaid graph to mermaid style. | ||
|
||
> This is a fork from Pugong Liu's excellent project, | ||
> which is no longer maintained." | ||
## Installation | ||
|
||
## Installation | ||
|
||
### Automatic | ||
Install the package with pip: | ||
|
||
```bash | ||
pip install mkdocs-mermaid-plugin | ||
pip install mkdocs-mermaid-plugin2 | ||
``` | ||
|
||
## Usage | ||
### Manual | ||
Clone this repository: | ||
|
||
```bash | ||
python setup.py install | ||
``` | ||
|
||
Enable this plugin in your `mkdocs.yml`: | ||
## Installation | ||
|
||
To enable this plugin, you need to declare it in your config file | ||
(`mkdocs.yml`). | ||
|
||
In order to work, the plugin also requires the | ||
[mermaid](https://www.npmjs.com/package/mermaid) javascript | ||
library (in the exemple below, it fetched from the last version | ||
from the [unpkg](https://unpkg.com/) repository; change the version | ||
no as needed). | ||
|
||
```yaml | ||
plugins: | ||
- markdownmermaid | ||
- markdownmermaid2 | ||
|
||
extra_javascript: | ||
- https://unpkg.com/mermaid@7.1.2/dist/mermaid.min.js | ||
- https://unpkg.com/mermaid@8.5.0/dist/mermaid.min.js | ||
``` | ||
> **Note:** Don't forget to include the mermaid.min.js (local or remotely) in your `mkdocs.yml` | ||
|
||
More information about plugins in the [MkDocs documentation][mkdocs-plugins] | ||
|
||
## Usage | ||
|
||
### General Principle | ||
In order to insert a mermaid diagram, simply insert the diagram, | ||
preceded by the language: | ||
|
||
|
||
```mermaid | ||
graph TD | ||
A[Client] --> B[Load Balancer] | ||
B --> C[Server01] | ||
B --> D[Server02] | ||
``` | ||
|
||
[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/ | ||
### How to write Mermaid diagrams | ||
* For instructions on how to make a diagram, see | ||
[the official website](https://mermaid-js.github.io/mermaid/#/). | ||
* If you are not familiar, see the [n00bs' introduction to mermaid](https://mermaid-js.github.io/mermaid/#/n00b-overview). | ||
* In case of doubt, you will want to test your diagrams in the | ||
[Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters