Skip to content

Commit 8ef5f38

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 47af476 + 1bfa1a8 commit 8ef5f38

17 files changed

+71
-51
lines changed

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ services:
55
stdin_open: true
66
tty: true
77
working_dir: /mermaid
8-
mem_limit: '2G'
8+
mem_limit: '4G'
99
environment:
10-
- NODE_OPTIONS=--max_old_space_size=2048
10+
- NODE_OPTIONS=--max_old_space_size=4096
1111
volumes:
1212
- ./:/mermaid
1313
- root_cache:/root/.cache

docs/config/Tutorials.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The definitions that can be generated the Live-Editor are also backwards-compati
3232

3333
## Mermaid with HTML
3434

35-
Examples are provided in [Getting Started](../intro/n00b-gettingStarted.md)
35+
Examples are provided in [Getting Started](../intro/getting-started.md)
3636

3737
**CodePen Examples:**
3838

docs/config/n00b-advanced.md renamed to docs/config/advanced.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
>
33
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
44
>
5-
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/n00b-advanced.md](../../packages/mermaid/src/docs/config/n00b-advanced.md).
5+
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/advanced.md](../../packages/mermaid/src/docs/config/advanced.md).
66
7-
# Advanced n00b mermaid (Coming soon..)
7+
# Advanced mermaid (Coming soon..)
88

99
## splitting mermaid code from html
1010

docs/config/usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pnpm add mermaid
4141

4242
**Hosting mermaid on a web page:**
4343

44-
> Note:This topic explored in greater depth in the [User Guide for Beginners](../intro/n00b-gettingStarted.md)
44+
> Note:This topic explored in greater depth in the [User Guide for Beginners](../intro/getting-started.md)
4545
4646
The easiest way to integrate mermaid on a web page requires two elements:
4747

docs/intro/n00b-gettingStarted.md renamed to docs/intro/getting-started.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
>
33
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
44
>
5-
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/intro/n00b-gettingStarted.md](../../packages/mermaid/src/docs/intro/n00b-gettingStarted.md).
5+
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/intro/getting-started.md](../../packages/mermaid/src/docs/intro/getting-started.md).
66
77
# A Mermaid User-Guide for Beginners
88

99
Mermaid is composed of three parts: Deployment, Syntax and Configuration.
1010

11-
This section talks about the different ways to deploy Mermaid. Learning the [Syntax](n00b-syntaxReference.md) would be of great help to the beginner.
11+
This section talks about the different ways to deploy Mermaid. Learning the [Syntax](syntax-reference.md) would be of great help to the beginner.
1212

1313
> Generally the live editor is enough for most general uses of mermaid, and is a good place to start learning.
1414
@@ -53,7 +53,7 @@ graph TD
5353

5454
In the `Code` section one can write or edit raw mermaid code, and instantly `Preview` the rendered result on the panel beside it.
5555

56-
The `Configuration` Section is for changing the appearance and behavior of mermaid diagrams. An easy introduction to mermaid configuration is found in the [Advanced usage](../config/n00b-advanced.md) section. A complete configuration reference cataloging the default values can be found on the [mermaidAPI](../config/setup/README.md) page.
56+
The `Configuration` Section is for changing the appearance and behavior of mermaid diagrams. An easy introduction to mermaid configuration is found in the [Advanced usage](../config/advanced.md) section. A complete configuration reference cataloging the default values can be found on the [mermaidAPI](../config/setup/README.md) page.
5757

5858
![Code,Config and Preview](./img/Code-Preview-Config.png)
5959

docs/intro/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
It is a JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.
1212

13-
> If you are familiar with Markdown you should have no problem learning [Mermaid's Syntax](n00b-syntaxReference.md).
13+
> If you are familiar with Markdown you should have no problem learning [Mermaid's Syntax](syntax-reference.md).
1414
1515
<img src="/header.png" alt="" />
1616

@@ -44,7 +44,7 @@ Mermaid allows even non-programmers to easily create detailed and diagrams throu
4444
[Tutorials](../config/Tutorials.md) has video tutorials.
4545
Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](../ecosystem/integrations.md).
4646

47-
For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](../intro/n00b-gettingStarted.md) and [Usage](../config/usage.md).
47+
For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](../intro/getting-started.md) and [Usage](../config/usage.md).
4848

4949
🌐 [CDN](https://www.jsdelivr.com/package/npm/mermaid) | 📖 [Documentation](https://mermaidjs.github.io) | 🙌 [Contribution](../community/development.md) | 🔌 [Plug-Ins](../ecosystem/integrations.md)
5050

@@ -284,9 +284,9 @@ quadrantChart
284284

285285
## Installation
286286

287-
**In depth guides and examples can be found at [Getting Started](./n00b-gettingStarted.md) and [Usage](../config/usage.md).**
287+
**In depth guides and examples can be found at [Getting Started](./getting-started.md) and [Usage](../config/usage.md).**
288288

289-
**It would also be helpful to learn more about mermaid's [Syntax](./n00b-syntaxReference.md).**
289+
**It would also be helpful to learn more about mermaid's [Syntax](./syntax-reference.md).**
290290

291291
### CDN
292292

@@ -402,7 +402,7 @@ Update version number in `package.json`.
402402
npm publish
403403
```
404404

405-
The above command generates files into the `dist` folder and publishes them to [npmjs.org](npmjs.org).
405+
The above command generates files into the `dist` folder and publishes them to [npmjs.com](https://www.npmjs.com/).
406406

407407
## Security and safe diagrams
408408

docs/intro/n00b-syntaxReference.md renamed to docs/intro/syntax-reference.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
>
33
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
44
>
5-
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/intro/n00b-syntaxReference.md](../../packages/mermaid/src/docs/intro/n00b-syntaxReference.md).
5+
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/intro/syntax-reference.md](../../packages/mermaid/src/docs/intro/syntax-reference.md).
66
77
# Diagram Syntax
88

@@ -42,7 +42,7 @@ erDiagram
4242
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
4343
```
4444

45-
The [Getting Started](./n00b-gettingStarted.md) section can also provide some practical examples of mermaid syntax.
45+
The [Getting Started](./getting-started.md) section can also provide some practical examples of mermaid syntax.
4646

4747
## Diagram Breaking
4848

@@ -66,20 +66,20 @@ Configuration is the third part of Mermaid, after deployment and syntax. It deal
6666

6767
If you are interested in altering and customizing your Mermaid Diagrams, you will find the methods and values available for [Configuration](../config/setup/README.md) here. It includes themes.
6868
This section will introduce the different methods of configuring the behaviors and appearances of Mermaid Diagrams.
69-
The following are the most commonly used methods, and they are all tied to Mermaid [Deployment](./n00b-gettingStarted.md) methods.
69+
The following are the most commonly used methods, and they are all tied to Mermaid [Deployment](./getting-started.md) methods.
7070

7171
### Configuration Section in the [Live Editor](https://mermaid.live).
7272

7373
Here you can edit certain values to change the behavior and appearance of the diagram.
7474

75-
### [The initialize() call](https://mermaid-js.github.io/mermaid/#/n00b-gettingStarted?id=_3-calling-the-javascript-api),
75+
### [The initialize() call](./getting-started.md#_3-calling-the-javascript-api)
7676

7777
Used when Mermaid is called via an API, or through a `<script>` tag.
7878

79-
### [Directives](../config/directives.md),
79+
### [Directives](../config/directives.md)
8080

8181
Allows for the limited reconfiguration of a diagram just before it is rendered. It can alter the font style, color and other aesthetic aspects of the diagram. You can pass a directive alongside your definition inside `%%{ }%%`. It can be done either above or below your diagram definition.
8282

83-
### [Theme Manipulation](../config/theming.md):
83+
### [Theme Manipulation](../config/theming.md)
8484

8585
An application of using Directives to change [Themes](../config/theming.md). `Theme` is a value within Mermaid's configuration that dictates the color scheme for diagrams.

packages/mermaid/src/docs/.vitepress/config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ function sidebarAll() {
109109
collapsed: false,
110110
items: [
111111
{ text: 'About Mermaid', link: '/intro/' },
112-
{ text: 'Getting Started', link: '/intro/n00b-gettingStarted' },
113-
{ text: 'Syntax and Configuration', link: '/intro/n00b-syntaxReference' },
112+
{ text: 'Getting Started', link: '/intro/getting-started' },
113+
{ text: 'Syntax and Configuration', link: '/intro/syntax-reference' },
114114
],
115115
},
116116
...sidebarSyntax(),
@@ -167,7 +167,7 @@ function sidebarConfig() {
167167
{ text: 'Theming', link: '/config/theming' },
168168
{ text: 'Accessibility', link: '/config/accessibility' },
169169
{ text: 'Mermaid CLI', link: '/config/mermaidCLI' },
170-
{ text: 'Advanced usage', link: '/config/n00b-advanced' },
170+
{ text: 'Advanced usage', link: '/config/advanced' },
171171
{ text: 'FAQ', link: '/config/faq' },
172172
],
173173
},

packages/mermaid/src/docs/.vitepress/theme/redirect.spec.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@ test.each([
1919
'https://mermaid-js.github.io/mermaid/#/flowchart?another=test&id=my-id&one=more', // with multiple params
2020
'syntax/flowchart.html#my-id',
2121
],
22-
['https://mermaid-js.github.io/mermaid/#/n00b-advanced', 'config/n00b-advanced.html'], // without .md
23-
['https://mermaid-js.github.io/mermaid/#/n00b-advanced.md', 'config/n00b-advanced.html'], // with .md
22+
['https://mermaid-js.github.io/mermaid/#/n00b-advanced', 'config/advanced.html'], // without .md
23+
['https://mermaid-js.github.io/mermaid/#/n00b-advanced.md', 'config/advanced.html'], // with .md
24+
25+
['https://mermaid-js.github.io/mermaid/#/n00b-gettingstarted', 'intro/getting-started.html'],
26+
['https://mermaid-js.github.io/mermaid/#/n00b-gettingstarted.md', 'intro/getting-started.html'],
27+
['https://mermaid-js.github.io/mermaid/#/n00b-overview', 'intro/getting-started.html'],
28+
['https://mermaid-js.github.io/mermaid/#/n00b-overview.md', 'intro/getting-started.html'],
29+
['https://mermaid-js.github.io/mermaid/#/n00b-syntaxreference', 'intro/syntax-reference.html'],
30+
['https://mermaid-js.github.io/mermaid/#/n00b-syntaxreference.md', 'intro/syntax-reference.html'],
31+
['https://mermaid-js.github.io/mermaid/#/quickstart', 'intro/getting-started.html'],
32+
['https://mermaid-js.github.io/mermaid/#/quickstart.md', 'intro/getting-started.html'],
2433
[
2534
'https://mermaid-js.github.io/mermaid/#/flowchart?id=a-node-in-the-form-of-a-circle', // with id, without .md
2635
'syntax/flowchart.html#a-node-in-the-form-of-a-circle',

packages/mermaid/src/docs/.vitepress/theme/redirect.ts

+19-7
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ const getBaseFile = (url: URL): Redirect => {
2525
};
2626

2727
/**
28-
* Used to redirect old documentation pages to corresponding new pages.
28+
* Used to redirect old (pre-vitepress) documentation pages to corresponding new pages.
29+
* The key is the old documentation ID, and the value is the new documentation path.
30+
* No key should be added here as it already has all the old documentation IDs.
31+
* If you are changing a documentation page, you should update the corresponding value here, and add an entry in the urlRedirectMap below.
2932
*/
3033
const idRedirectMap: Record<string, string> = {
34+
// ID of the old documentation page: Path of the new documentation page
3135
'8.6.0_docs': '',
3236
accessibility: 'config/theming',
3337
breakingchanges: '',
@@ -50,15 +54,14 @@ const idRedirectMap: Record<string, string> = {
5054
mermaidcli: 'config/mermaidCLI',
5155
mindmap: 'syntax/mindmap',
5256
'more-pages': '',
53-
'n00b-advanced': 'config/n00b-advanced',
54-
'n00b-gettingstarted': 'intro/n00b-gettingStarted',
55-
'n00b-overview': 'intro/n00b-gettingStarted',
56-
'community/n00b-overview': 'intro/n00b-gettingStarted',
57-
'n00b-syntaxreference': 'intro/n00b-syntaxReference',
57+
'n00b-advanced': 'config/advanced',
58+
'n00b-gettingstarted': 'intro/getting-started',
59+
'n00b-overview': 'intro/getting-started',
60+
'n00b-syntaxreference': 'intro/syntax-reference',
5861
newdiagram: 'community/newDiagram',
5962
pie: 'syntax/pie',
6063
plugins: '',
61-
quickstart: 'intro/n00b-gettingStarted',
64+
quickstart: 'intro/getting-started',
6265
requirementdiagram: 'syntax/requirementDiagram',
6366
security: 'community/security',
6467
sequencediagram: 'syntax/sequenceDiagram',
@@ -74,10 +77,19 @@ const idRedirectMap: Record<string, string> = {
7477

7578
/**
7679
* Used to redirect pages that have been moved in the vitepress site.
80+
* No keys should be deleted from here.
81+
* If you are changing a documentation page, you should update the corresponding value here,
82+
* and update the entry in the idRedirectMap above if it was present
83+
* (No need to add new keys in idRedirectMap).
7784
*/
7885
const urlRedirectMap: Record<string, string> = {
86+
// Old URL: New URL
7987
'/misc/faq.html': 'configure/faq.html',
8088
'/syntax/c4c.html': 'syntax/c4.html',
89+
'/config/n00b-advanced.html': 'config/advanced',
90+
'/intro/n00b-gettingStarted.html': 'intro/getting-started',
91+
'/intro/n00b-syntaxReference.html': 'intro/syntax-reference',
92+
'/community/n00b-overview.html': 'intro/getting-started',
8193
};
8294

8395
/**

packages/mermaid/src/docs/config/Tutorials.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The definitions that can be generated the Live-Editor are also backwards-compati
2626

2727
## Mermaid with HTML
2828

29-
Examples are provided in [Getting Started](../intro/n00b-gettingStarted.md)
29+
Examples are provided in [Getting Started](../intro/getting-started.md)
3030

3131
**CodePen Examples:**
3232

packages/mermaid/src/docs/config/n00b-advanced.md renamed to packages/mermaid/src/docs/config/advanced.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Advanced n00b mermaid (Coming soon..)
1+
# Advanced mermaid (Coming soon..)
22

33
## splitting mermaid code from html
44

packages/mermaid/src/docs/config/usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pnpm add mermaid
3535

3636
**Hosting mermaid on a web page:**
3737

38-
> Note:This topic explored in greater depth in the [User Guide for Beginners](../intro/n00b-gettingStarted.md)
38+
> Note:This topic explored in greater depth in the [User Guide for Beginners](../intro/getting-started.md)
3939
4040
The easiest way to integrate mermaid on a web page requires two elements:
4141

packages/mermaid/src/docs/intro/n00b-gettingStarted.md renamed to packages/mermaid/src/docs/intro/getting-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Mermaid is composed of three parts: Deployment, Syntax and Configuration.
44

5-
This section talks about the different ways to deploy Mermaid. Learning the [Syntax](n00b-syntaxReference.md) would be of great help to the beginner.
5+
This section talks about the different ways to deploy Mermaid. Learning the [Syntax](syntax-reference.md) would be of great help to the beginner.
66

77
> Generally the live editor is enough for most general uses of mermaid, and is a good place to start learning.
88
@@ -36,7 +36,7 @@ graph TD
3636

3737
In the `Code` section one can write or edit raw mermaid code, and instantly `Preview` the rendered result on the panel beside it.
3838

39-
The `Configuration` Section is for changing the appearance and behavior of mermaid diagrams. An easy introduction to mermaid configuration is found in the [Advanced usage](../config/n00b-advanced.md) section. A complete configuration reference cataloging the default values can be found on the [mermaidAPI](../config/setup/README.md) page.
39+
The `Configuration` Section is for changing the appearance and behavior of mermaid diagrams. An easy introduction to mermaid configuration is found in the [Advanced usage](../config/advanced.md) section. A complete configuration reference cataloging the default values can be found on the [mermaidAPI](../config/setup/README.md) page.
4040

4141
![Code,Config and Preview](./img/Code-Preview-Config.png)
4242

packages/mermaid/src/docs/intro/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
It is a JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.
66

7-
> If you are familiar with Markdown you should have no problem learning [Mermaid's Syntax](n00b-syntaxReference.md).
7+
> If you are familiar with Markdown you should have no problem learning [Mermaid's Syntax](syntax-reference.md).
88
99
<img src="/header.png" alt="" />
1010

@@ -39,7 +39,7 @@ Mermaid allows even non-programmers to easily create detailed and diagrams throu
3939
[Tutorials](../config/Tutorials.md) has video tutorials.
4040
Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](../ecosystem/integrations.md).
4141

42-
For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](../intro/n00b-gettingStarted.md) and [Usage](../config/usage.md).
42+
For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](../intro/getting-started.md) and [Usage](../config/usage.md).
4343

4444
🌐 [CDN](https://www.jsdelivr.com/package/npm/mermaid) | 📖 [Documentation](https://mermaidjs.github.io) | 🙌 [Contribution](../community/development.md) | 🔌 [Plug-Ins](../ecosystem/integrations.md)
4545

@@ -59,9 +59,9 @@ In our release process we rely heavily on visual regression tests using [applito
5959

6060
## Installation
6161

62-
**In depth guides and examples can be found at [Getting Started](./n00b-gettingStarted.md) and [Usage](../config/usage.md).**
62+
**In depth guides and examples can be found at [Getting Started](./getting-started.md) and [Usage](../config/usage.md).**
6363

64-
**It would also be helpful to learn more about mermaid's [Syntax](./n00b-syntaxReference.md).**
64+
**It would also be helpful to learn more about mermaid's [Syntax](./syntax-reference.md).**
6565

6666
### CDN
6767

@@ -179,7 +179,7 @@ Update version number in `package.json`.
179179
npm publish
180180
```
181181

182-
The above command generates files into the `dist` folder and publishes them to [npmjs.org](npmjs.org).
182+
The above command generates files into the `dist` folder and publishes them to [npmjs.com](https://www.npmjs.com/).
183183

184184
## Security and safe diagrams
185185

packages/mermaid/src/docs/intro/n00b-syntaxReference.md renamed to packages/mermaid/src/docs/intro/syntax-reference.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ erDiagram
2424
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
2525
```
2626

27-
The [Getting Started](./n00b-gettingStarted.md) section can also provide some practical examples of mermaid syntax.
27+
The [Getting Started](./getting-started.md) section can also provide some practical examples of mermaid syntax.
2828

2929
## Diagram Breaking
3030

@@ -48,20 +48,20 @@ Configuration is the third part of Mermaid, after deployment and syntax. It deal
4848

4949
If you are interested in altering and customizing your Mermaid Diagrams, you will find the methods and values available for [Configuration](../config/setup/README.md) here. It includes themes.
5050
This section will introduce the different methods of configuring the behaviors and appearances of Mermaid Diagrams.
51-
The following are the most commonly used methods, and they are all tied to Mermaid [Deployment](./n00b-gettingStarted.md) methods.
51+
The following are the most commonly used methods, and they are all tied to Mermaid [Deployment](./getting-started.md) methods.
5252

5353
### Configuration Section in the [Live Editor](https://mermaid.live).
5454

5555
Here you can edit certain values to change the behavior and appearance of the diagram.
5656

57-
### [The initialize() call](https://mermaid-js.github.io/mermaid/#/n00b-gettingStarted?id=_3-calling-the-javascript-api),
57+
### [The initialize() call](./getting-started.md#_3-calling-the-javascript-api)
5858

5959
Used when Mermaid is called via an API, or through a `<script>` tag.
6060

61-
### [Directives](../config/directives.md),
61+
### [Directives](../config/directives.md)
6262

6363
Allows for the limited reconfiguration of a diagram just before it is rendered. It can alter the font style, color and other aesthetic aspects of the diagram. You can pass a directive alongside your definition inside `%%{ }%%`. It can be done either above or below your diagram definition.
6464

65-
### [Theme Manipulation](../config/theming.md):
65+
### [Theme Manipulation](../config/theming.md)
6666

6767
An application of using Directives to change [Themes](../config/theming.md). `Theme` is a value within Mermaid's configuration that dictates the color scheme for diagrams.

0 commit comments

Comments
 (0)