Skip to content

Commit beb3429

Browse files
committed
Add configuration and usage
1 parent 5f9904f commit beb3429

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,35 @@ Django template tag for showing mermaid diagrams.
55
[![PyPI](https://img.shields.io/pypi/v/django-mermaid.svg)](https://pypi.org/project/django-mermaid/)
66
[![License](https://img.shields.io/pypi/l/django-mermaid.svg)](https://github.com/ArtyomVancyan/django-mermaid/blob/master/LICENSE)
77
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)
8+
[![Tests](https://github.com/ArtyomVancyan/django-mermaid/actions/workflows/tests.yml/badge.svg)](https://github.com/ArtyomVancyan/django-mermaid/actions/workflows/tests.yml)
89

910
## Install
1011

1112
```shell
1213
python -m pip install django-mermaid
1314
```
1415

16+
## Configuration
17+
18+
Add the `django_mermaid.apps.MermaidConfig` to your `INSTALLED_APPS` setting:
19+
20+
```python
21+
INSTALLED_APPS = [
22+
..., # other apps
23+
'django_mermaid.apps.MermaidConfig',
24+
]
25+
```
26+
27+
## Usage
28+
29+
Once you have installed the app, you can use the `mermaid` template tag in your templates.
30+
31+
```html
32+
{% load mermaid %}
33+
34+
{% mermaid "graph LR; A-->B;" %}
35+
```
36+
1537
## Contribute
1638

1739
Any contribution is welcome. If you have any ideas or suggestions, feel free to open an issue or a pull request. And

0 commit comments

Comments
 (0)