Skip to content

Commit 1df45a6

Browse files
committed
Update README
1 parent b493ace commit 1df45a6

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,26 @@ INSTALLED_APPS = [
2929
## Usage
3030

3131
After you configure the `INSTALLED_APPS`, you will be able to load the `mermaid` in your template and use the template
32-
tag for rendering mermaid diagrams.
32+
tags for rendering mermaid diagrams.
33+
34+
For small diagrams we recommend the simple tag:
3335

3436
```jinja2
3537
{% load mermaid %}
3638
{% mermaid "graph LR; A-->B;" %}
3739
```
3840

41+
For larger diagrams we recommend the block tag:
42+
43+
```jinja2
44+
{% load mermaid %}
45+
{% startmermaid %}
46+
graph LR
47+
A-->B
48+
{% endmermaid %}
49+
```
50+
51+
3952
### Mermaid version
4053

4154
By default, Django Mermaid uses the **9.4.3** version of mermaid. However, if you want to use a specific version of
@@ -65,6 +78,7 @@ the `MERMAID_THEME` variable.
6578

6679
```jinja2
6780
{% mermaid "graph LR; A-->B;" "dark" %}
81+
{% startmermaid "dark" %}graph LR; A--B;{% endmermaid %}
6882
```
6983

7084
### Mermaid theme variables
@@ -88,4 +102,4 @@ don't forget to add tests for your changes.
88102

89103
## License
90104

91-
Copyright (C) 2023 Artyom Vancyan. [MIT](https://github.com/pysnippet/django-mermaid/blob/master/LICENSE)
105+
Copyright (C) 2025 Artyom Vancyan. [MIT](https://github.com/pysnippet/django-mermaid/blob/master/LICENSE)

0 commit comments

Comments
 (0)