Skip to content

Commit 80f560d

Browse files
committed
update documentation
1 parent 5b82351 commit 80f560d

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ In order to use environment variables in user names or passwords, use the
7474
* [Reload user-defined scripts](#Reload-user-defined-scripts)
7575
* [HighlightJS support](#HighlightJS-support)
7676
* [Arithmatex support](#Arithmatex-support)
77-
* [Mermaid2 support](#Mermaid2-support)
77+
* [Mermaid.js support](#Mermaid.js-support)
7878
* [Security](#Security)
7979
* [Crypto-js or webcrypto?](#Crypto-js-or-webcrypto?)
8080
* [File name obfuscation](#File-name-obfuscation)
@@ -710,6 +710,8 @@ for `mkdocs-material`.
710710

711711
In order to be able to decrypt the search index (`dynamically`) `mkdocs-material` needs to be customized (patched).
712712

713+
Patches for different versions can be found [here](https://github.com/unverbuggt/mkdocs-encryptcontent-plugin/tree/version3/patches).
714+
713715
#### Material 8.x
714716

715717
You'll need some [prerequisites](https://squidfunk.github.io/mkdocs-material/customization/#environment-setup)
@@ -807,7 +809,9 @@ MathJax.typesetPromise()
807809
> **NOTE** It has been tested in Arithmatex `generic` mode only.
808810

809811

810-
### Mermaid2 support
812+
### Mermaid.js support
813+
814+
#### mkdocs-mermaid2-plugin
811815

812816
> **Enable by default**
813817

@@ -860,7 +864,22 @@ graph LR
860864
///
861865
````
862866

867+
#### mkdocs-material
868+
869+
Add support for mermaid graphs by adding the `pymdownx.superfences` to `markdown_extensions` as
870+
described [here]( https://squidfunk.github.io/mkdocs-material/reference/diagrams/).
871+
872+
Copy the "material-encryptcontent.mjs" file from
873+
[here](https://github.com/unverbuggt/mkdocs-encryptcontent-plugin/tree/version3/fixes)
874+
to "/assets/javascripts/" and include it to "mkdocs.yml" like this:
875+
876+
```yaml
877+
extra_javascript:
878+
- assets/javascripts/material-encryptcontent.mjs
879+
```
863880

881+
The script is called after successful decryption and renders the mermaid graphs in a similar way as
882+
the theme would normally do.
864883
## Security
865884

866885
### Crypto-js or webcrypto?

documentation/docs/features/jsext.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ MathJax.typesetPromise()
6464
> **NOTE** It has been tested in Arithmatex `generic` mode only.
6565

6666

67-
### Mermaid2 support
67+
### Mermaid.js support
68+
69+
#### mkdocs-mermaid2-plugin
6870

6971
> **Enable by default**
7072

@@ -117,3 +119,19 @@ graph LR
117119
///
118120
````
119121

122+
#### mkdocs-material
123+
124+
Add support for mermaid graphs by adding the `pymdownx.superfences` to `markdown_extensions` as
125+
described [here]( https://squidfunk.github.io/mkdocs-material/reference/diagrams/).
126+
127+
Copy the "material-encryptcontent.mjs" file from
128+
[here](https://github.com/unverbuggt/mkdocs-encryptcontent-plugin/tree/version3/fixes)
129+
to "/assets/javascripts/" and include it to "mkdocs.yml" like this:
130+
131+
```yaml
132+
extra_javascript:
133+
- assets/javascripts/material-encryptcontent.mjs
134+
```
135+
136+
The script is called after successful decryption and renders the mermaid graphs in a similar way as
137+
the theme would normally do.

0 commit comments

Comments
 (0)