-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new parameter javascript to the mermaid config
- it contains a url or local javascript file (relative to docs dir) - extra_javascript still allowed (and bypasses the new mechanism), but is now DEPRECATED
- Loading branch information
Laurent Franceschetti
committed
Aug 30, 2023
1 parent
70b52d0
commit e48544e
Showing
11 changed files
with
3,531 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Mermaid test (simple) | ||
|
||
## Mermaid usual | ||
This is a test of Mermaid: | ||
|
||
```mermaid | ||
graph TD | ||
hello --> world | ||
world --> world2 | ||
``` | ||
|
||
> If you don't see a graph here, it's broken. | ||
## Git Graph | ||
This is a test of Git Graph: | ||
|
||
```mermaid | ||
gitGraph | ||
commit | ||
commit | ||
branch develop | ||
checkout develop | ||
commit | ||
commit | ||
checkout main | ||
merge develop | ||
commit | ||
commit | ||
``` | ||
|
||
|
||
## Normal fences | ||
This is usual fenced code (with no highlighting) | ||
|
||
```python | ||
for page in pages: | ||
page.read() | ||
``` | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Second page | ||
Testing special cases | ||
|
||
## Wrong diagram | ||
|
||
```mermaid | ||
graph FG | ||
A[Client] | ||
``` | ||
|
||
## Correct | ||
|
||
```mermaid | ||
graph TD | ||
A[Client] --> B[Load Balancer] | ||
``` | ||
|
||
## Other | ||
|
||
```mermaid | ||
graph TD | ||
A[Client] --> B[Load Balancer] | ||
B --> C[Server01] | ||
B --> D[Server02] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
site_name: Mermaid test (simple, extra_javascript) | ||
site_description: Test for mermaid | ||
docs_dir: docs # indispensable or readthedocs will fail | ||
theme: readthedocs # you may want to try windmill? | ||
|
||
|
||
nav: | ||
- Main: index.md | ||
- Second: second.md | ||
|
||
plugins: | ||
- search | ||
- mermaid2 | ||
|
||
extra_javascript: | ||
- js/mermaid.min.js | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Mermaid test (simple) | ||
|
||
## Mermaid usual | ||
This is a test of Mermaid: | ||
|
||
```mermaid | ||
graph TD | ||
hello --> world | ||
world --> world2 | ||
``` | ||
|
||
> If you don't see a graph here, it's broken. | ||
## Git Graph | ||
This is a test of Git Graph: | ||
|
||
```mermaid | ||
gitGraph | ||
commit | ||
commit | ||
branch develop | ||
checkout develop | ||
commit | ||
commit | ||
checkout main | ||
merge develop | ||
commit | ||
commit | ||
``` | ||
|
||
|
||
## Normal fences | ||
This is usual fenced code (with no highlighting) | ||
|
||
```python | ||
for page in pages: | ||
page.read() | ||
``` | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Second page | ||
Testing special cases | ||
|
||
## Wrong diagram | ||
|
||
```mermaid | ||
graph FG | ||
A[Client] | ||
``` | ||
|
||
## Correct | ||
|
||
```mermaid | ||
graph TD | ||
A[Client] --> B[Load Balancer] | ||
``` | ||
|
||
## Other | ||
|
||
```mermaid | ||
graph TD | ||
A[Client] --> B[Load Balancer] | ||
B --> C[Server01] | ||
B --> D[Server02] | ||
``` |
Oops, something went wrong.