File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,36 @@ Once you have installed the app, you can use the `mermaid` template tag in your
33
33
{% mermaid "graph LR; A-->B;" %}
34
34
```
35
35
36
+ ### Mermaid version
37
+
36
38
By default, Django Mermaid uses the ** 9.4.3** version of mermaid. However, if you want to use a specific version of
37
- mermaid, you can set the ` MERMAID_VERSION ` variable in your Django project's settings.py file.
39
+ mermaid, you can set the ` MERMAID_VERSION ` variable in your Django project's ** settings.py** file.
38
40
39
41
``` python
40
42
MERMAID_VERSION = ' 10.0.3-alpha.1'
41
43
```
42
44
43
45
Make sure the version you specify is available on the [ mermaid CDN] ( https://cdnjs.com/libraries/mermaid ) , and has
44
- the ` mermaid.min.js ` file.
46
+ the ** mermaid.min.js** file.
47
+
48
+ ### Mermaid theme
49
+
50
+ You can specify the theme right in the template tag dynamically overriding the value of the ` MERMAID_THEME ` variable.
51
+
52
+ ``` jinja2
53
+ {% mermaid "graph LR; A-->B;" "dark" %}
54
+ ```
55
+
56
+ Also, you can set the ` MERMAID_THEME ` variable in your Django project's ** settings.py** file as a default theme.
57
+ However, Django Mermaid uses the
58
+ [ default] ( https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-default.js ) theme of
59
+ mermaid by default.
60
+
61
+ ``` python
62
+ MERMAID_THEME = ' neutral'
63
+ ```
64
+
65
+ The available themes supported by mermaid are listed at mermaid [ docs] ( https://mermaid.js.org/config/theming ) .
45
66
46
67
## Contribute
47
68
You can’t perform that action at this time.
0 commit comments