-
Notifications
You must be signed in to change notification settings - Fork 26
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from setuptools import setup, find_packages | ||
|
||
|
||
VERSION = '1.0.8' | ||
VERSION = '1.0.9' | ||
|
||
# required if you want to run tests | ||
# pip install 'mkdocs-mermaid2-plugin[test]' | ||
|
@@ -16,9 +16,7 @@ def readme(): | |
|
||
LONG_DESCRIPTION = ( | ||
"An Mkdocs plugin that renders Mermaid graphs in the markdown file. " | ||
"To install, please follow instructions in the Readme file.\n" | ||
"This is a fork of the Pugong Liu's excellent project, " | ||
"which is no longer maintained." | ||
"To install, please follow instructions in the README file." | ||
) | ||
|
||
setup( | ||
|
@@ -28,8 +26,8 @@ def readme(): | |
long_description=LONG_DESCRIPTION, | ||
keywords='mkdocs python markdown mermaid', | ||
url='https://github.com/fralau/mkdocs-mermaid2-plugin', | ||
author='pugong, Fralau', | ||
author_email='[email protected], [email protected]', | ||
author='Fralau', | ||
author_email='[email protected]', | ||
license='MIT', | ||
python_requires='>=3.6', | ||
install_requires=[ | ||
|
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.