You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
+
## 1.1.0, 2023-09-01
8
+
9
+
Added: Parameter `javascript` in config file for optionally specifying the
10
+
URL or path of the Mermaid javascript library.
11
+
12
+
Changed: Parameter `extra_javascript` in config file is DEPRECATED,
13
+
for optionally specifying the URL or path of the Mermaid javascript library
14
+
15
+
Changed: Updated documentation.
16
+
7
17
## 1.0.8, 2023-08-09
8
18
9
19
Fixed: Arguments of config file not taken into consideration,
An [MkDocs](https://www.mkdocs.org/) plugin that renders textual graph
11
-
descriptions into [Mermaid](https://mermaid-js.github.io/mermaid) graphs
12
-
(flow charts, sequence diagrams, pie charts, etc.).
12
+
An [MkDocs](https://www.mkdocs.org/) plugin that renders [Mermaid](https://mermaid-js.github.io/mermaid) text descriptions into diagrams (flow charts, sequence diagrams, pie charts, etc.).
13
+
14
+
</div>
15
+
16
+
---
13
17
14
18
***See the [mkdocs-mermaid2 documentation on Read The Docs](https://mkdocs-mermaid2.readthedocs.io).**
15
19
* See the [package on Pypi](https://pypi.org/project/mkdocs-mermaid2-plugin/).
@@ -26,15 +30,17 @@ markdown-toc -i README.md
26
30
27
31
<!-- toc -->
28
32
29
-
-[Introduction](#introduction)
30
-
-[Installation](#installation)
31
-
*[Automatic](#automatic)
32
-
*[Manual](#manual)
33
-
*[Test](#test)
34
-
-[Configuration](#configuration)
35
-
*[Basic configuration](#basic-configuration)
36
-
*[Specifying the version of the Mermaid library](#specifying-the-version-of-the-mermaid-library)
37
-
-[For more information](#for-more-information)
33
+
-[Mkdocs-Mermaid2](#mkdocs-mermaid2)
34
+
-[Introduction](#introduction)
35
+
-[Installation](#installation)
36
+
-[Automatic](#automatic)
37
+
-[Manual](#manual)
38
+
-[Test](#test)
39
+
-[Configuration](#configuration)
40
+
-[Basic configuration](#basic-configuration)
41
+
-[Specifying the version of the Mermaid library](#specifying-the-version-of-the-mermaid-library)
42
+
-[Additional settings for the Material theme](#additional-settings-for-the-material-theme)
The behavior of the plugin depends of the version of Mermaid.js, because
54
-
version 10.0.0 represents a significant change ([see changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md#1000)).
66
+
Mkdocs-Macros inserts the Mermaid.js library into the HTML page
67
+
**only** when a Mermaid diagram is detected in the markdown page.
55
68
56
-
=== "Mermaid.js > 10.0.0"
69
+
!!! Warning "Change of distribution format"
70
+
The behavior of the plugin depends of the version of Mermaid.js.
57
71
58
-
> *From version 1.0 of mkdocs-mermaid2*
72
+
[As of version 10 of the Mermaid javascript library, the plugin uses the ESM format for distribution](https://github.com/mermaid-js/mermaid/releases/tag/v10.0.0) (see also the [changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md#1000)).
59
73
60
-
[For versions from 10.0.0 of the Mermaid javascript library, the plugin uses the ESM format](https://github.com/mermaid-js/mermaid/releases/tag/v10.0.0), since
61
-
it is the only one available. This requires a specific call from the HTML
74
+
More information can be found on [ECMAScript Module](https://nodejs.org/api/esm.html#modules-ecmascript-modules)
75
+
(or **ESM**), but for our purposes:
76
+
77
+
1. **The main file is recognizable because it has the `.mjs` extension.**
78
+
2. The HTML call must have the form: `<script src="<URL>", type="module">`
79
+
3. A module in ESM format is not a single file, but a hierarchy of directories/files.
80
+
81
+
**MkDocs-Mermaid2, as of version 1.0, takes this difference into account.**
82
+
83
+
=== "ESM Library"
84
+
85
+
> For versions of MkDocs-Mermaid2 >= 1 and versions of Mermaid2.js >= 10
0 commit comments