File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,26 @@ INSTALLED_APPS = [
29
29
## Usage
30
30
31
31
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:
33
35
34
36
``` jinja2
35
37
{% load mermaid %}
36
38
{% mermaid "graph LR; A-->B;" %}
37
39
```
38
40
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
+
39
52
### Mermaid version
40
53
41
54
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.
65
78
66
79
``` jinja2
67
80
{% mermaid "graph LR; A-->B;" "dark" %}
81
+ {% startmermaid "dark" %}graph LR; A--B;{% endmermaid %}
68
82
```
69
83
70
84
### Mermaid theme variables
@@ -88,4 +102,4 @@ don't forget to add tests for your changes.
88
102
89
103
## License
90
104
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 )
You can’t perform that action at this time.
0 commit comments