简体中文
@@ -33,7 +33,7 @@ Try Live Editor previews of future releases:
@@ -42,7 +42,7 @@ Try Live Editor previews of future releases:
+
## Table of content
@@ -53,7 +53,7 @@ Try Live Editor previews of future releases: docs - live editor]
+### Flowchart [docs - live editor]
```
flowchart LR
@@ -115,12 +115,12 @@ C -->|One| D[Result 1]
C -->|Two| E[Result 2]
```
-### Sequence diagram [docs - live editor]
+### Sequence diagram [docs - live editor]
```
sequenceDiagram
Alice->>John: Hello John, how are you?
-loop Healthcheck
+loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
@@ -132,7 +132,7 @@ Bob-->>John: Jolly good!
```mermaid
sequenceDiagram
Alice->>John: Hello John, how are you?
-loop Healthcheck
+loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
@@ -141,7 +141,7 @@ John->>Bob: How about you?
Bob-->>John: Jolly good!
```
-### Gantt chart [docs - live editor]
+### Gantt chart [docs - live editor]
```
gantt
@@ -165,7 +165,7 @@ gantt
Parallel 4 : des6, after des4, 1d
```
-### Class diagram [docs - live editor]
+### Class diagram [docs - live editor]
```
classDiagram
@@ -207,7 +207,7 @@ class Class10 {
```
-### State diagram [docs - live editor]
+### State diagram [docs - live editor]
```
stateDiagram-v2
@@ -229,7 +229,7 @@ Moving --> Crash
Crash --> [*]
```
-### Pie chart [docs - live editor]
+### Pie chart [docs - live editor]
```
pie
@@ -247,7 +247,7 @@ pie
### Git graph [experimental - live editor]
-### Bar chart (using gantt chart) [docs - live editor]
+### Bar chart (using gantt chart) [docs - live editor]
```
gantt
@@ -285,7 +285,7 @@ gantt
5 : 0, 5
```
-### User Journey diagram [docs - live editor]
+### User Journey diagram [docs - live editor]
```
journey
@@ -311,7 +311,7 @@ gantt
Sit down: 3: Me
```
-### C4 diagram [docs]
+### C4 diagram [docs]
```
C4Context
@@ -405,7 +405,7 @@ The above command generates files into the `dist` folder and publishes them to <
Mermaid is a growing community and is always accepting new contributors. There's a lot of different ways to help out and we're always looking for extra hands! Look at [this issue](https://github.com/mermaid-js/mermaid/issues/866) if you want to know where to start helping out.
-Detailed information about how to contribute can be found in the [contribution guide](CONTRIBUTING.md)
+Detailed information about how to contribute can be found in the [contribution guide](https://mermaid.js.org/community/contributing.html)
## Security and safe diagrams
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 98975ea331..942f54bff9 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -15,7 +15,7 @@ Mermaid
实时编辑器!
- pie title Pets adopted by volunteers
+ pie title Default text position: Animal adoption
accTitle: simple pie char demo
accDescr: pie chart with 3 sections: dogs, cats, rats. Most are dogs.
"Dogs": 386
@@ -27,7 +27,7 @@
Pie chart demos
%%{init: {"pie": {"textPosition": 0.9}, "themeVariables": {"pieOuterStrokeWidth": "5px"}}}%%
pie
- title Key elements in Product X
+ title Offset labels close to border: Product X
accTitle: Key elements in Product X
accDescr: This is a pie chart showing the key elements in Product X.
"Calcium": 42.96
@@ -36,6 +36,19 @@
Pie chart demos
"Iron": 5
+
+ %%{init: {"pie": {"textPosition": 0.45}, "themeVariables": {"pieOuterStrokeWidth": "5px"}}}%%
+ pie
+ title Centralized labels: Languages
+ accTitle: Key elements in Product X
+ accDescr: This is a pie chart showing the key elements in Product X.
+ "JavaScript": 30
+ "Python": 25
+ "Java": 20
+ "C#": 15
+ "Others": 10
+
+
+
+
+```
diff --git a/docs/config/setup/interfaces/mermaidAPI.ParseOptions.md b/docs/config/setup/interfaces/mermaidAPI.ParseOptions.md
index 4386be9380..fa100744ed 100644
--- a/docs/config/setup/interfaces/mermaidAPI.ParseOptions.md
+++ b/docs/config/setup/interfaces/mermaidAPI.ParseOptions.md
@@ -14,6 +14,9 @@
• `Optional` **suppressErrors**: `boolean`
+If `true`, parse will return `false` instead of throwing error when the diagram is invalid.
+The `parseError` function will not be called.
+
#### Defined in
-[mermaidAPI.ts:60](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L60)
+[mermaidAPI.ts:64](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L64)
diff --git a/docs/config/setup/interfaces/mermaidAPI.ParseResult.md b/docs/config/setup/interfaces/mermaidAPI.ParseResult.md
new file mode 100644
index 0000000000..9f912cc8c2
--- /dev/null
+++ b/docs/config/setup/interfaces/mermaidAPI.ParseResult.md
@@ -0,0 +1,21 @@
+> **Warning**
+>
+> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
+>
+> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaidAPI.ParseResult.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaidAPI.ParseResult.md).
+
+# Interface: ParseResult
+
+[mermaidAPI](../modules/mermaidAPI.md).ParseResult
+
+## Properties
+
+### diagramType
+
+• **diagramType**: `string`
+
+The diagram type, e.g. 'flowchart', 'sequence', etc.
+
+#### Defined in
+
+[mermaidAPI.ts:71](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L71)
diff --git a/docs/config/setup/interfaces/mermaidAPI.RenderResult.md b/docs/config/setup/interfaces/mermaidAPI.RenderResult.md
index 6209782f75..b5cc48038b 100644
--- a/docs/config/setup/interfaces/mermaidAPI.RenderResult.md
+++ b/docs/config/setup/interfaces/mermaidAPI.RenderResult.md
@@ -14,10 +14,6 @@
• `Optional` **bindFunctions**: (`element`: `Element`) => `void`
-#### Type declaration
-
-▸ (`element`): `void`
-
Bind function to be called after the svg has been inserted into the DOM.
This is necessary for adding event listeners to the elements in the svg.
@@ -27,6 +23,10 @@ div.innerHTML = svg;
bindFunctions?.(div); // To call bindFunctions only if it's present.
```
+#### Type declaration
+
+▸ (`element`): `void`
+
##### Parameters
| Name | Type |
@@ -39,7 +39,19 @@ bindFunctions?.(div); // To call bindFunctions only if it's present.
#### Defined in
-[mermaidAPI.ts:80](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L80)
+[mermaidAPI.ts:94](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L94)
+
+---
+
+### diagramType
+
+• **diagramType**: `string`
+
+The diagram type, e.g. 'flowchart', 'sequence', etc.
+
+#### Defined in
+
+[mermaidAPI.ts:84](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L84)
---
@@ -51,4 +63,4 @@ The svg code for the rendered graph.
#### Defined in
-[mermaidAPI.ts:70](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L70)
+[mermaidAPI.ts:80](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L80)
diff --git a/docs/config/setup/modules/defaultConfig.md b/docs/config/setup/modules/defaultConfig.md
index 7a9b891c43..d3495bc0c3 100644
--- a/docs/config/setup/modules/defaultConfig.md
+++ b/docs/config/setup/modules/defaultConfig.md
@@ -14,7 +14,7 @@
#### Defined in
-[defaultConfig.ts:272](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L272)
+[defaultConfig.ts:275](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts#L275)
---
diff --git a/docs/config/setup/modules/mermaidAPI.md b/docs/config/setup/modules/mermaidAPI.md
index 6f2be89c14..1a68b05bd0 100644
--- a/docs/config/setup/modules/mermaidAPI.md
+++ b/docs/config/setup/modules/mermaidAPI.md
@@ -9,6 +9,7 @@
## Interfaces
- [ParseOptions](../interfaces/mermaidAPI.ParseOptions.md)
+- [ParseResult](../interfaces/mermaidAPI.ParseResult.md)
- [RenderResult](../interfaces/mermaidAPI.RenderResult.md)
## References
@@ -25,17 +26,79 @@ Renames and re-exports [mermaidAPI](mermaidAPI.md#mermaidapi)
#### Defined in
-[mermaidAPI.ts:64](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L64)
+[mermaidAPI.ts:74](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L74)
## Variables
### mermaidAPI
-• `Const` **mermaidAPI**: `Readonly`<{ `defaultConfig`: `MermaidConfig` = configApi.defaultConfig; `getConfig`: () => `MermaidConfig` = configApi.getConfig; `getDiagramFromText`: (`text`: `string`, `metadata`: `Pick`<`DiagramMetadata`, `"title"`>) => `Promise`<`Diagram`> ; `getSiteConfig`: () => `MermaidConfig` = configApi.getSiteConfig; `globalReset`: () => `void` ; `initialize`: (`options`: `MermaidConfig`) => `void` ; `parse`: (`text`: `string`, `parseOptions?`: [`ParseOptions`](../interfaces/mermaidAPI.ParseOptions.md)) => `Promise`<`boolean`> ; `render`: (`id`: `string`, `text`: `string`, `svgContainingElement?`: `Element`) => `Promise`<[`RenderResult`](../interfaces/mermaidAPI.RenderResult.md)> ; `reset`: () => `void` ; `setConfig`: (`conf`: `MermaidConfig`) => `MermaidConfig` = configApi.setConfig; `updateSiteConfig`: (`conf`: `MermaidConfig`) => `MermaidConfig` = configApi.updateSiteConfig }>
+• `Const` **mermaidAPI**: `Readonly`<{ `defaultConfig`: `MermaidConfig` = configApi.defaultConfig; `getConfig`: () => `MermaidConfig` = configApi.getConfig; `getDiagramFromText`: (`text`: `string`, `metadata`: `Pick`<`DiagramMetadata`, `"title"`>) => `Promise`<`Diagram`> ; `getSiteConfig`: () => `MermaidConfig` = configApi.getSiteConfig; `globalReset`: () => `void` ; `initialize`: (`options`: `MermaidConfig`) => `void` ; `parse`: (`text`: `string`, `parseOptions`: [`ParseOptions`](../interfaces/mermaidAPI.ParseOptions.md) & { `suppressErrors`: `true` }) => `Promise`<[`ParseResult`](../interfaces/mermaidAPI.ParseResult.md) | `false`>(`text`: `string`, `parseOptions?`: [`ParseOptions`](../interfaces/mermaidAPI.ParseOptions.md)) => `Promise`<[`ParseResult`](../interfaces/mermaidAPI.ParseResult.md)> ; `render`: (`id`: `string`, `text`: `string`, `svgContainingElement?`: `Element`) => `Promise`<[`RenderResult`](../interfaces/mermaidAPI.RenderResult.md)> ; `reset`: () => `void` ; `setConfig`: (`conf`: `MermaidConfig`) => `MermaidConfig` = configApi.setConfig; `updateSiteConfig`: (`conf`: `MermaidConfig`) => `MermaidConfig` = configApi.updateSiteConfig }>
+
+## mermaidAPI configuration defaults
+
+```ts
+const config = {
+ theme: 'default',
+ logLevel: 'fatal',
+ securityLevel: 'strict',
+ startOnLoad: true,
+ arrowMarkerAbsolute: false,
+ suppressErrorRendering: false,
+
+ er: {
+ diagramPadding: 20,
+ layoutDirection: 'TB',
+ minEntityWidth: 100,
+ minEntityHeight: 75,
+ entityPadding: 15,
+ stroke: 'gray',
+ fill: 'honeydew',
+ fontSize: 12,
+ useMaxWidth: true,
+ },
+ flowchart: {
+ diagramPadding: 8,
+ htmlLabels: true,
+ curve: 'basis',
+ },
+ sequence: {
+ diagramMarginX: 50,
+ diagramMarginY: 10,
+ actorMargin: 50,
+ width: 150,
+ height: 65,
+ boxMargin: 10,
+ boxTextMargin: 5,
+ noteMargin: 10,
+ messageMargin: 35,
+ messageAlign: 'center',
+ mirrorActors: true,
+ bottomMarginAdj: 1,
+ useMaxWidth: true,
+ rightAngles: false,
+ showSequenceNumbers: false,
+ },
+ gantt: {
+ titleTopMargin: 25,
+ barHeight: 20,
+ barGap: 4,
+ topPadding: 50,
+ leftPadding: 75,
+ gridLineStartPadding: 35,
+ fontSize: 11,
+ fontFamily: '"Open Sans", sans-serif',
+ numberSectionStyles: 4,
+ axisFormat: '%Y-%m-%d',
+ topAxis: false,
+ displayMode: '',
+ },
+};
+mermaid.initialize(config);
+```
#### Defined in
-[mermaidAPI.ts:548](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L548)
+[mermaidAPI.ts:635](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L635)
## Functions
@@ -66,7 +129,7 @@ Return the last node appended
#### Defined in
-[mermaidAPI.ts:263](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L263)
+[mermaidAPI.ts:277](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L277)
---
@@ -92,7 +155,7 @@ the cleaned up svgCode
#### Defined in
-[mermaidAPI.ts:209](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L209)
+[mermaidAPI.ts:223](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L223)
---
@@ -117,7 +180,7 @@ the string with all the user styles
#### Defined in
-[mermaidAPI.ts:139](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L139)
+[mermaidAPI.ts:153](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L153)
---
@@ -140,7 +203,7 @@ the string with all the user styles
#### Defined in
-[mermaidAPI.ts:186](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L186)
+[mermaidAPI.ts:200](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L200)
---
@@ -167,7 +230,7 @@ with an enclosing block that has each of the cssClasses followed by !important;
#### Defined in
-[mermaidAPI.ts:124](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L124)
+[mermaidAPI.ts:138](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L138)
---
@@ -193,7 +256,7 @@ Put the svgCode into an iFrame. Return the iFrame code
#### Defined in
-[mermaidAPI.ts:240](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L240)
+[mermaidAPI.ts:254](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L254)
---
@@ -218,4 +281,4 @@ Remove any existing elements from the given document
#### Defined in
-[mermaidAPI.ts:313](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L313)
+[mermaidAPI.ts:327](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L327)
diff --git a/docs/config/theming.md b/docs/config/theming.md
index 63271a39b7..3045298f63 100644
--- a/docs/config/theming.md
+++ b/docs/config/theming.md
@@ -12,15 +12,15 @@ Themes can now be customized at the site-wide level, or on individual Mermaid di
## Available Themes
-1. [**default**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-default.js) - This is the default theme for all diagrams.
+1. [**default**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-default.js) - This is the default theme for all diagrams.
-2. [**neutral**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-neutral.js) - This theme is great for black and white documents that will be printed.
+2. [**neutral**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-neutral.js) - This theme is great for black and white documents that will be printed.
-3. [**dark**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-dark.js) - This theme goes well with dark-colored elements or dark-mode.
+3. [**dark**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-dark.js) - This theme goes well with dark-colored elements or dark-mode.
-4. [**forest**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-forest.js) - This theme contains shades of green.
+4. [**forest**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-forest.js) - This theme contains shades of green.
-5. [**base**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-base.js) - This is the only theme that can be modified. Use this theme as the base for customizations.
+5. [**base**](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/themes/theme-base.js) - This is the only theme that can be modified. Use this theme as the base for customizations.
## Site-wide Theme
@@ -65,7 +65,7 @@ Example of `init` directive setting the `theme` to `forest`:
a --> b
```
-> **Reminder**: the only theme that can be customed is the `base` theme. The following section covers how to use `themeVariables` for customizations.
+> **Reminder**: the only theme that can be customized is the `base` theme. The following section covers how to use `themeVariables` for customizations.
## Customizing Themes with `themeVariables`
@@ -250,7 +250,7 @@ The theming engine will only recognize hex colors and not color names. So, the v
| actorBkg | mainBkg | Actor Background Color |
| actorBorder | primaryBorderColor | Actor Border Color |
| actorTextColor | primaryTextColor | Actor Text Color |
-| actorLineColor | grey | Actor Line Color |
+| actorLineColor | actorBorder | Actor Line Color |
| signalColor | textColor | Signal Color |
| signalTextColor | textColor | Signal Text Color |
| labelBoxBkgColor | actorBkg | Label Box Background Color |
diff --git a/docs/config/usage.md b/docs/config/usage.md
index 699171001d..d853643d37 100644
--- a/docs/config/usage.md
+++ b/docs/config/usage.md
@@ -20,7 +20,7 @@ Please note that you can switch versions through the dropdown box at the top rig
For the majority of users, Using the [Live Editor](https://mermaid.live/) would be sufficient, however you may also opt to deploy mermaid as a dependency or using the [Mermaid API](./setup/README.md).
-We have compiled some Video [Tutorials](./Tutorials.md) on how to use the Mermaid Live Editor.
+We have compiled some Video [Tutorials](../ecosystem/tutorials.md) on how to use the Mermaid Live Editor.
### Installing and Hosting Mermaid on a Webpage
@@ -73,7 +73,7 @@ Example:
## Simple full example:
```html
-
+
@@ -286,11 +286,11 @@ const drawDiagram = async function () {
};
```
-1. The graph is generated using the render call.
-2. After generation the render function calls the provided callback function, in this case it's called insertSvg.
-3. The callback function is called with two parameters, the SVG code of the generated graph and a function. This function binds events to the SVG **after** it is inserted into the DOM.
-4. Insert the SVG code into the DOM for presentation.
-5. Call the binding function that binds the events.
+1. The graph is generated using the render call.
+2. After generation the render function calls the provided callback function, in this case it's called insertSvg.
+3. The callback function is called with two parameters, the SVG code of the generated graph and a function. This function binds events to the SVG **after** it is inserted into the DOM.
+4. Insert the SVG code into the DOM for presentation.
+5. Call the binding function that binds the events.
## Example of a marked renderer
@@ -331,15 +331,17 @@ module.exports = (options) ->
## Advanced usage
-**Syntax validation without rendering (Work in Progress)**
+### Syntax validation without rendering
-The **mermaid.parse(txt)** function validates graph definitions without rendering a graph. **[This function is still a work in progress](https://github.com/mermaid-js/mermaid/issues/1066), find alternatives below.**
+The `mermaid.parse(text, parseOptions)` function validates graph definitions without rendering a graph.
-The function **mermaid.parse(txt)**, takes a text string as an argument and returns true if the definition follows mermaid's syntax and
-false if it does not. The parseError function will be called when the parse function returns false.
+The function `mermaid.parse(text, parseOptions)`, takes a text string as an argument and returns `{ diagramType: string }` if the definition follows mermaid's syntax.
-When the parser encounters invalid syntax the **mermaid.parseError** function is called. It is possible to override this
-function in order to handle the error in an application-specific way.
+If the definition is invalid, the function returns `false` if `parseOptions.suppressErrors` is set to `true`. Otherwise, it throws an error.
+
+The parseError function will be called when the parse function throws an error. It will not be called if `parseOptions.suppressErrors` is set to `true`.
+
+It is possible to override this function in order to handle the error in an application-specific way.
The code-example below in meta code illustrates how this could work:
@@ -359,26 +361,10 @@ const textFieldUpdated = async function () {
bindEventHandler('change', 'code', textFieldUpdated);
```
-**Alternative to mermaid.parse():**
-One effective and more future-proof method of validating your graph definitions, is to paste and render them via the [Mermaid Live Editor](https://mermaid.live/). This will ensure that your code is compliant with the syntax of Mermaid's most recent version.
-
## Configuration
-Mermaid takes a number of options which lets you tweak the rendering of the diagrams. Currently there are three ways of
-setting the options in mermaid.
-
-1. Instantiation of the configuration using the initialize call
-2. _Using the global mermaid object_ - **Deprecated**
-3. _using the global mermaid_config object_ - **Deprecated**
-4. Instantiation of the configuration using the **mermaid.init** call- **Deprecated**
-
-The list above has two ways too many of doing this. Three are deprecated and will eventually be removed. The list of
-configuration objects are described [in the mermaidAPI documentation](./setup/README.md).
-
-## Using the `mermaidAPI.initialize`/`mermaid.initialize` call
-
-The future proof way of setting the configuration is by using the initialization call to mermaid or mermaidAPI depending
-on what kind of integration you use.
+You can pass the required configuration to the `mermaid.initialize` call. This is the preferred way of configuring mermaid.
+The list of configuration objects are described [in the mermaidAPI documentation](./setup/README.md).
```html
+
+
diff --git a/packages/mermaid/src/docs/.vitepress/theme/custom.css b/packages/mermaid/src/docs/.vitepress/theme/custom.css
index 28ef8d3385..1d72056ecb 100644
--- a/packages/mermaid/src/docs/.vitepress/theme/custom.css
+++ b/packages/mermaid/src/docs/.vitepress/theme/custom.css
@@ -1,5 +1,5 @@
-@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
-@import url('https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css');
+@import 'font-awesome/css/font-awesome.min.css';
+@import '@mdi/font/css/materialdesignicons.min.css';
:root {
--vp-c-brand: #ff3670;
diff --git a/packages/mermaid/src/docs/.vitepress/theme/index.ts b/packages/mermaid/src/docs/.vitepress/theme/index.ts
index 6561578106..3ebb7614a1 100644
--- a/packages/mermaid/src/docs/.vitepress/theme/index.ts
+++ b/packages/mermaid/src/docs/.vitepress/theme/index.ts
@@ -6,39 +6,40 @@ import Mermaid from './Mermaid.vue';
import Contributors from '../components/Contributors.vue';
// @ts-ignore
import HomePage from '../components/HomePage.vue';
-// // @ts-ignore
-// import TopBar from '../components/TopBar.vue';
-
+// @ts-ignore
+import TopBar from '../components/TopBar.vue';
import { getRedirect } from './redirect.js';
-
import { h } from 'vue';
-
import Theme from 'vitepress/theme';
import '../style/main.css';
import 'uno.css';
+import type { EnhanceAppContext } from 'vitepress';
export default {
...DefaultTheme,
Layout() {
return h(Theme.Layout, null, {
// Keeping this as comment as it took a lot of time to figure out how to add a component to the top bar.
- // 'home-hero-before': () => h(TopBar),
+ 'home-hero-before': () => h(TopBar),
'home-features-after': () => h(HomePage),
});
},
- enhanceApp({ app, router }) {
+ enhanceApp({ app, router }: EnhanceAppContext) {
// register global components
app.component('Mermaid', Mermaid);
app.component('Contributors', Contributors);
router.onBeforeRouteChange = (to) => {
try {
- const newPath = getRedirect(to);
+ const url = new URL(window.location.origin + to);
+ const newPath = getRedirect(url);
if (newPath) {
console.log(`Redirecting to ${newPath} from ${window.location}`);
// router.go isn't loading the ID properly.
window.location.href = `/${newPath}`;
}
- } catch (e) {}
+ } catch (e) {
+ console.error(e);
+ }
};
},
};
diff --git a/packages/mermaid/src/docs/.vitepress/theme/redirect.spec.ts b/packages/mermaid/src/docs/.vitepress/theme/redirect.spec.ts
index 09c14d935b..91b6c91fee 100644
--- a/packages/mermaid/src/docs/.vitepress/theme/redirect.spec.ts
+++ b/packages/mermaid/src/docs/.vitepress/theme/redirect.spec.ts
@@ -38,10 +38,24 @@ test.each([
['https://mermaid.js.org/#/flowchart.md', 'syntax/flowchart.html'],
// New docs, without base path, new domain
['https://mermaid.js.org/misc/faq.html', 'configure/faq.html'],
+ ['https://mermaid.js.org/community/newDiagram.html', 'community/new-diagram.html'],
+ [
+ 'https://mermaid.js.org/community/development.html',
+ 'community/contributing.html#initial-setup',
+ ],
+ [
+ 'https://mermaid.js.org/community/docker-development.html',
+ 'community/contributing.html#initial-setup',
+ ],
+ ['https://mermaid.js.org/community/code.html', 'community/contributing.html#contributing-code'],
+ [
+ 'https://mermaid.js.org/community/documentation.html',
+ 'community/contributing.html#contributing-documentation',
+ ],
[
'https://mermaid.js.org/misc/faq.html#frequently-asked-questions',
'configure/faq.html#frequently-asked-questions',
], // with hash
])('should process url %s to %s', (link: string, path: string) => {
- expect(getRedirect(link)).toBe(path);
+ expect(getRedirect(new URL(link))).toBe(path);
});
diff --git a/packages/mermaid/src/docs/.vitepress/theme/redirect.ts b/packages/mermaid/src/docs/.vitepress/theme/redirect.ts
index e24d2beb9d..1b04e01d5f 100644
--- a/packages/mermaid/src/docs/.vitepress/theme/redirect.ts
+++ b/packages/mermaid/src/docs/.vitepress/theme/redirect.ts
@@ -58,7 +58,7 @@ const idRedirectMap: Record = {
'n00b-gettingstarted': 'intro/getting-started',
'n00b-overview': 'intro/getting-started',
'n00b-syntaxreference': 'intro/syntax-reference',
- newdiagram: 'community/newDiagram',
+ newdiagram: 'community/new-diagram',
pie: 'syntax/pie',
plugins: '',
quickstart: 'intro/getting-started',
@@ -69,7 +69,7 @@ const idRedirectMap: Record = {
statediagram: 'syntax/stateDiagram',
themes: 'config/theming',
theming: 'config/theming',
- tutorials: 'config/Tutorials',
+ tutorials: 'ecosystem/tutorials',
upgrading: '',
usage: 'config/usage',
'user-journey': 'syntax/userJourney',
@@ -88,10 +88,15 @@ const urlRedirectMap: Record = {
'/syntax/c4c.html': 'syntax/c4.html',
'/ecosystem/integrations.html': 'ecosystem/integrations-community.html',
'/ecosystem/showcases.html': 'ecosystem/integrations-create',
- '/config/n00b-advanced.html': 'config/advanced',
- '/intro/n00b-gettingStarted.html': 'intro/getting-started',
- '/intro/n00b-syntaxReference.html': 'intro/syntax-reference',
- '/community/n00b-overview.html': 'intro/getting-started',
+ '/config/n00b-advanced.html': 'config/configuration.html',
+ '/intro/n00b-gettingStarted.html': 'intro/getting-started.html',
+ '/intro/n00b-syntaxReference.html': 'intro/syntax-reference.html',
+ '/community/n00b-overview.html': 'intro/getting-started.html',
+ '/community/newDiagram.html': 'community/new-diagram.html',
+ '/community/development.html': 'community/contributing.html#initial-setup',
+ '/community/docker-development.html': 'community/contributing.html#initial-setup',
+ '/community/code.html': 'community/contributing.html#contributing-code',
+ '/community/documentation.html': 'community/contributing.html#contributing-documentation',
};
/**
@@ -99,8 +104,7 @@ const urlRedirectMap: Record = {
* @param link - The old documentation URL.
* @returns The new documentation path.
*/
-export const getRedirect = (link: string): string | undefined => {
- const url = new URL(link);
+export const getRedirect = (url: URL): string | undefined => {
// Redirects for deprecated vitepress URLs
if (url.pathname in urlRedirectMap) {
return `${urlRedirectMap[url.pathname]}${url.hash}`;
diff --git a/packages/mermaid/src/docs/community/code.md b/packages/mermaid/src/docs/community/code.md
deleted file mode 100644
index 93a5fcd953..0000000000
--- a/packages/mermaid/src/docs/community/code.md
+++ /dev/null
@@ -1,165 +0,0 @@
-# Contributing Code
-
-The basic steps for contributing code are:
-
-```mermaid
-graph LR
- git[1. Checkout a git branch] --> codeTest[2. Write tests and code] --> doc[3. Update documentation] --> submit[4. Submit a PR] --> review[5. Review and merge]
-```
-
-1. **Create** and checkout a git branch and work on your code in the branch
-2. Write and update **tests** (unit and perhaps even integration (e2e) tests) (If you do TDD/BDD, the order might be different.)
-3. **Let users know** that things have changed or been added in the documents! This is often overlooked, but _critical_
-4. **Submit** your code as a _pull request_.
-5. Maintainers will **review** your code. If there are no changes necessary, the PR will be merged. Otherwise, make the requested changes and repeat.
-
-## 1. Checkout a git branch
-
-Mermaid uses a [Git Flow](https://guides.github.com/introduction/flow/)–inspired approach to branching.
-
-Development is done in the `develop` branch.
-
-Once development is done we create a `release/vX.X.X` branch from `develop` for testing.
-
-Once the release happens we add a tag to the `release` branch and merge it with `master`. The live product and on-line documentation are what is in the `master` branch.
-
-**All new work should be based on the `develop` branch.**
-
-**When you are ready to do work, always, ALWAYS:**
-
-1. Make sure you have the most up-to-date version of the `develop` branch. (fetch or pull to update it)
-2. Check out the `develop` branch
-3. Create a new branch for your work. Please name the branch following our naming convention below.
-
-We use the following naming convention for branches:
-
-```txt
- [feature | bug | chore | docs]/[issue number]_[short description using dashes ('-') or underscores ('_') instead of spaces]
-```
-
-You can always check current [configuration of labelling and branch prefixes](https://github.com/mermaid-js/mermaid/blob/develop/.github/pr-labeler.yml)
-
-- The first part is the **type** of change: a feature, bug, chore, or documentation change ('docs')
-- followed by a _slash_ (which helps to group like types together in many git tools)
-- followed by the **issue number**
-- followed by an _underscore_ ('\_')
-- followed by a short text description (but use dashes ('-') or underscores ('\_') instead of spaces)
-
-If your work is specific to a single diagram type, it is a good idea to put the diagram type at the start of the description. This will help us keep release notes organized: it will help us keep changes for a diagram type together.
-
-**Ex: A new feature described in issue 2945 that adds a new arrow type called 'florbs' to state diagrams**
-
-`feature/2945_state-diagram-new-arrow-florbs`
-
-**Ex: A bug described in issue 1123 that causes random ugly red text in multiple diagram types**
-`bug/1123_fix_random_ugly_red_text`
-
-## 2. Write Tests
-
-Tests ensure that each function, module, or part of code does what it says it will do. This is critically
-important when other changes are made to ensure that existing code is not broken (no regression).
-
-Just as important, the tests act as _specifications:_ they specify what the code does (or should do).
-Whenever someone is new to a section of code, they should be able to read the tests to get a thorough understanding of what it does and why.
-
-If you are fixing a bug, you should add tests to ensure that your code has actually fixed the bug, to specify/describe what the code is doing, and to ensure the bug doesn't happen again.
-(If there had been a test for the situation, the bug never would have happened in the first place.)
-You may need to change existing tests if they were inaccurate.
-
-If you are adding a feature, you will definitely need to add tests. Depending on the size of your feature, you may need to add integration tests.
-
-### Unit Tests
-
-Unit tests are tests that test a single function or module. They are the easiest to write and the fastest to run.
-
-Unit tests are mandatory all code except the renderers. (The renderers are tested with integration tests.)
-
-We use [Vitest](https://vitest.dev) to run unit tests.
-
-You can use the following command to run the unit tests:
-
-```sh
-pnpm test
-```
-
-When writing new tests, it's easier to have the tests automatically run as you make changes. You can do this by running the following command:
-
-```sh
-pnpm test:watch
-```
-
-### Integration/End-to-End (e2e) tests
-
-These test the rendering and visual appearance of the diagrams.
-This ensures that the rendering of that feature in the e2e will be reviewed in the release process going forward. Less chance that it breaks!
-
-To start working with the e2e tests:
-
-1. Run `pnpm dev` to start the dev server
-2. Start **Cypress** by running `pnpm cypress:open`.
-
-The rendering tests are very straightforward to create. There is a function `imgSnapshotTest`, which takes a diagram in text form and the mermaid options, and it renders that diagram in Cypress.
-
-When running in CI it will take a snapshot of the rendered diagram and compare it with the snapshot from last build and flag it for review if it differs.
-
-This is what a rendering test looks like:
-
-```js
-it('should render forks and joins', () => {
- imgSnapshotTest(
- `
- stateDiagram
- state fork_state <<fork>>
- [*] --> fork_state
- fork_state --> State2
- fork_state --> State3
-
- state join_state <<join>>
- State2 --> join_state
- State3 --> join_state
- join_state --> State4
- State4 --> [*]
- `,
- { logLevel: 0 }
- );
- cy.get('svg');
-});
-```
-
-**_[TODO - running the tests against what is expected in development. ]_**
-
-**_[TODO - how to generate new screenshots]_**
-....
-
-## 3. Update Documentation
-
-If the users have no way to know that things have changed, then you haven't really _fixed_ anything for the users; you've just added to making Mermaid feel broken.
-Likewise, if users don't know that there is a new feature that you've implemented, it will forever remain unknown and unused.
-
-The documentation has to be updated to users know that things have changed and added!
-If you are adding a new feature, add `(v+)` in the title or description. It will be replaced automatically with the current version number when the release happens.
-
-eg: `# Feature Name (v+)`
-
-We know it can sometimes be hard to code _and_ write user documentation.
-
-Our documentation is managed in `packages/mermaid/src/docs`. Details on how to edit is in the [Contributing Documentation](#contributing-documentation) section.
-
-Create another issue specifically for the documentation.
-You will need to help with the PR, but definitely ask for help if you feel stuck.
-When it feels hard to write stuff out, explaining it to someone and having that person ask you clarifying questions can often be 80% of the work!
-
-When in doubt, write up and submit what you can. It can be clarified and refined later. (With documentation, something is better than nothing!)
-
-## 4. Submit your pull request
-
-**[TODO - PR titles should start with (fix | feat | ....)]**
-
-We make all changes via Pull Requests (PRs). As we have many Pull Requests from developers new to Mermaid, we have put in place a process wherein _knsv, Knut Sveidqvist_ is in charge of the final release process and the active maintainers are in charge of reviewing and merging most PRs.
-
-- PRs will be reviewed by active maintainers, who will provide feedback and request changes as needed.
-- The maintainers will request a review from knsv, if necessary.
-- Once the PR is approved, the maintainers will merge the PR into the `develop` branch.
-- When a release is ready, the `release/x.x.x` branch will be created, extensively tested and knsv will be in charge of the release process.
-
-**Reminder: Pull Requests should be submitted to the develop branch.**
diff --git a/packages/mermaid/src/docs/community/contributing.md b/packages/mermaid/src/docs/community/contributing.md
new file mode 100644
index 0000000000..195146a612
--- /dev/null
+++ b/packages/mermaid/src/docs/community/contributing.md
@@ -0,0 +1,525 @@
+# Mermaid Contributing Guide
+
+You decided to take part in the development? Welcome!
+
+We are trying to make our guidelines for you as explicit and detailed as possible.
+
+## Initial Setup
+
+Initial setup consists of 3 main steps:
+
+```mermaid-nocode
+flowchart LR
+ source --> requirements --> setup
+
+ source[Get the Source Code]
+ requirements[Install the Requirements]
+ setup[Install Packages]
+```
+
+### Get the Source Code
+
+In GitHub, you first [**fork a mermaid repository**](https://github.com/mermaid-js/mermaid/fork) when you are going to make changes and submit pull requests.
+
+Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
+
+```tip
+[Here is a GitHub document that gives an overview of the process](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
+```
+
+```bash
+git clone git@github.com/your-fork/mermaid
+```
+
+Once you have cloned the repository onto your development machine, change into the `mermaid` project folder (the top level directory of the mermaid project repository)
+
+```bash
+cd mermaid
+```
+
+### Install Requirements
+
+We support **development within Docker** environment along with **host setup**. You may choose it up to your preferences.
+
+**Host**
+
+These are the tools we use for working with the code and documentation:
+
+- [Node.js](https://nodejs.org/en/).
+- [pnpm](https://pnpm.io/) package manager.
+
+The following commands must be sufficient enough to start with:
+
+```bash
+curl -fsSL https://get.pnpm.io/install.sh | sh -
+pnpm env use --global 18
+```
+
+You may also need to reload `.shrc` or `.bashrc` afterwards.
+
+**Docker**
+
+[Install Docker](https://docs.docker.com/engine/install/). And that is pretty much all you need.
+
+Optionally, to run GUI (Cypress) within Docker you will also need an X11 server installed.
+You might already have it installed, so check this by running:
+
+```bash
+echo $DISPLAY
+```
+
+If the `$DISPLAY` variable is not empty, then an X11 server is running. Otherwise you may need to install one.
+
+### Install Packages
+
+**Host**
+
+Install packages:
+
+```bash
+pnpm install
+```
+
+**Docker**
+
+For development using Docker there is a self-documented `run` bash script, which provides convenient aliases for `docker compose` commands.
+
+Make sure that `./run` script is executable:
+
+```bash
+chmod +x run
+```
+
+```tip
+To get detailed help simply type `./run` or `./run help`.
+
+It also has short _Development quick start guide_ embedded.
+```
+
+Then install packages:
+
+```bash
+./run pnpm install
+```
+
+### Verify Everything Works
+
+This step is optional, but it helps to make sure that everything in development branch was OK before you started making any changes.
+
+You can run the `test` script to verify that pnpm is working _and_ that the repository has been cloned correctly:
+
+**Host**
+
+```bash
+pnpm test
+```
+
+**Docker**
+
+```bash
+./run pnpm test
+```
+
+The `test` script and others are in the top-level `package.json` file.
+
+All tests should run successfully without any errors or failures.
+
+```note
+You might see _lint_ or _formatting_ warnings. Those are ok during this step.
+```
+
+## Workflow
+
+Contributing process is very simple and straightforward:
+
+```mermaid-nocode
+ flowchart LR
+
+ branch --> changes --> submit
+ branch[Checkout a New Branch]
+ changes[Make Changes]
+ submit[Submit a PR]
+```
+
+Mermaid uses a [Git Flow](https://guides.github.com/introduction/flow/)–inspired approach to branching.
+
+Development is done in the `develop` branch.
+
+```mermaid-nocode
+---
+config:
+ gitGraph:
+ mainBranchName: develop
+---
+gitGraph LR:
+ commit
+ commit
+ branch "docs/2910_update-guidelines" order: 1
+ commit
+ commit
+ commit
+ checkout develop
+ merge "docs/2910_update-guidelines"
+ commit
+```
+
+To prepare a new version for release the maintainers create a `release/vX.X.X` branch from `develop` for testing. Once the release happens we add a tag to the `release` branch and merge it with `master`. The live product and on-line documentation are what is in the `master` branch.
+
+## Checkout a New Branch
+
+```tip
+All new work should be based on the `develop` branch.
+```
+
+Make sure you have the most up-to-date version of the `develop` branch.
+
+Check out the `develop` branch, then `fetch` or `pull` to update it:
+
+```bash
+git checkout develop
+git fetch # or `git pull`
+```
+
+Create a new branch for your work:
+
+```bash
+git checkout -b docs/2910_update-contributing-guidelines
+```
+
+We use the following naming convention for branches:
+
+```txt
+[feature | bug | chore | docs]/[issue number]_[short-description]
+```
+
+You can always check current [configuration of labelling and branch prefixes](https://github.com/mermaid-js/mermaid/blob/develop/.github/pr-labeler.yml)
+
+- The first part is the **type** of change: a `feature`, `bug`, `chore`, `docs`
+- followed by a **slash** (`/`),which helps to group like types together in many git tools
+- followed by the **issue number**, e.g. `2910`
+- followed by an **underscore** (`_`)
+- followed by a **short description** with dashes (`-`) or underscores (`_`) instead of spaces
+
+```mermaid-nocode
+flowchart LR
+ feature --> slash
+ bug --> slash
+ chore --> slash
+ docs --> slash
+ slash --> 2945 --> underscore
+ slash --> 1123 --> underscore
+ underscore --> short_description_1
+ underscore --> short_description_2
+
+ underscore["_"]
+ slash["/"]
+
+ short_description_1["state-diagram-new-arrow-florbs"]
+ short_description_2["fix_random_ugly_red_text"]
+```
+
+If your work is specific to a single diagram type, it is a good idea to put the diagram type at the start of the description. This will help us keep release notes organized by a diagram type.
+
+```note
+A new feature described in issue 2945 that adds a new arrow type called 'florbs' to state diagrams
+
+`feature/2945_state-diagram-new-arrow-florbs`
+```
+
+```tip
+A bug described in issue 1123 that causes random ugly red text in multiple diagram types
+
+`bug/1123_fix_random_ugly_red_text`
+```
+
+## Contributing Code
+
+Code is the heart of every software project. We strive to make it better. Who if not us?
+
+### Where is the Code Located?
+
+The core of Mermaid is located under `packages/mermaid/src`.
+
+### Running Mermaid Locally
+
+**Host**
+
+```bash
+pnpm run dev
+```
+
+**Docker**
+
+```bash
+./run dev
+```
+
+After starting the dev server open in your browser.
+
+Now you are ready to make your changes!
+
+### Make Changes
+
+Have a look at . There is a list of demos that can be used to see and test your changes.
+
+If you need a specific diagram, you can duplicate the `example.html` file in `/demos/dev` and add your own mermaid code to your copy.
+
+That will be served at .
+After making code changes, the dev server will rebuild the mermaid library and automatically reload the page.
+
+Edit files in `packages/mermaid/src` as required.
+
+### Write Tests
+
+Tests ensure that each function, module, or part of code does what it says it will do. This is critically important when other changes are made to ensure that existing code is not broken (no regression).
+
+Just as important, the tests act as _specifications:_ they specify what the code does (or should do).
+Whenever someone is new to a section of code, they should be able to read the tests to get a thorough understanding of what it does and why.
+
+If you are fixing a bug, you should add tests to ensure that your code has actually fixed the bug, to specify/describe what the code is doing, and to ensure the bug doesn't happen again.
+(If there had been a test for the situation, the bug never would have happened in the first place.)
+You may need to change existing tests if they were inaccurate.
+
+If you are adding a feature, you will definitely need to add tests. Depending on the size of your feature, you may need to add integration tests.
+
+#### Unit Tests
+
+Unit tests are tests that test a single function or module. They are the easiest to write and the fastest to run.
+
+Unit tests are mandatory for all code except the renderers. (The renderers are tested with integration tests.)
+
+We use [Vitest](https://vitest.dev) to run unit tests.
+
+**Host**
+
+You can use the following command to run the unit tests:
+
+```sh
+pnpm test
+```
+
+When writing new tests, it's easier to have the tests automatically run as you make changes. You can do this by running the following command:
+
+```sh
+pnpm test:watch
+```
+
+**Docker**
+
+When using Docker prepend your command with `./run`:
+
+```sh
+./run pnpm test
+```
+
+#### Integration / End-to-End (E2E) Tests
+
+These test the rendering and visual appearance of the diagrams.
+
+This ensures that the rendering of that feature in the E2E will be reviewed in the release process going forward. Less chance that it breaks!
+
+To start working with the E2E tests:
+
+**Host**
+
+- Run `pnpm dev` to start the dev server
+- Start **Cypress** by running `pnpm cypress:open`
+
+**Docker**
+
+- Enable local connections for x11 server `xhost +local:`
+- Run `./run pnpm dev` to start the dev server
+- Start **Cypress** by running `./run pnpm cypress:open --project .`
+
+The rendering tests are very straightforward to create. There is a function `imgSnapshotTest`, which takes a diagram in text form and the mermaid options, and it renders that diagram in Cypress.
+
+When running in CI it will take a snapshot of the rendered diagram and compare it with the snapshot from last build and flag it for review if it differs.
+
+This is what a rendering test looks like:
+
+```js
+it('should render forks and joins', () => {
+ imgSnapshotTest(
+ `
+ stateDiagram
+ state fork_state <<fork>>
+ [*] --> fork_state
+ fork_state --> State2
+ fork_state --> State3
+
+ state join_state <<join>>
+ State2 --> join_state
+ State3 --> join_state
+ join_state --> State4
+ State4 --> [*]
+ `,
+ { logLevel: 0 }
+ );
+});
+```
+
+
+
+
+### Update Documentation
+
+```tip
+Our documentation is managed in `packages/mermaid/src/docs`. Details on how to edit is in the [documentation section](#contributing-documentation)
+```
+
+If the users have no way to know that things have changed, then you haven't really _fixed_ anything for the users; you've just added to making Mermaid feel broken.
+Likewise, if users don't know that there is a new feature that you've implemented, it will forever remain unknown and unused.
+
+The documentation has to be updated for users to know that things have been changed and added!
+If you are adding a new feature, add `(v10.8.0+)` in the title or description. It will be replaced automatically with the current version number when the release happens.
+
+eg: `# Feature Name (v10.8.0+)`
+
+We know it can sometimes be hard to code _and_ write user documentation.
+
+Create another issue specifically for the documentation.
+You will need to help with the PR, but definitely ask for help if you feel stuck.
+When it feels hard to write stuff out, explaining it to someone and having that person ask you clarifying questions can often be 80% of the work!
+
+When in doubt, write up and submit what you can. It can be clarified and refined later. (With documentation, something is better than nothing!)
+
+## Contributing Documentation
+
+If it is not in the documentation, it's like it never happened. Wouldn't that be sad? With all the effort that was put into the feature?
+
+### Where is the Documentation Located?
+
+```warning
+DO NOT CHANGE FILES IN `/docs`
+
+The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually.
+```
+
+Documentation is located in the [`packages/mermaid/src/docs`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder. Just pick the right section and start typing.
+
+The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published.
+
+```mermaid
+flowchart LR
+ classDef default fill:#fff,color:black,stroke:black
+
+ source["Edit /packages/mermaid/src/docs"] -- automatic processing--> published["View /docs which will be published on Official Website"]
+```
+
+### Running the Documentation Website Locally
+
+**[The mermaid documentation site](https://mermaid.js.org/) is powered by [Vitepress](https://vitepress.vuejs.org/).**
+
+Start development server for the documentation site
+
+**Host**
+
+```bash
+pnpm --filter mermaid run docs:dev
+```
+
+or
+
+```bash
+cd packages/mermaid
+pnpm docs:dev
+```
+
+**Docker**
+
+```bash
+./run docs:dev
+```
+
+Open [http://localhost:3333/](http://localhost:3333/) in your browser.
+
+### Formatting
+
+The documentation is written in Markdown. To get acquainted with its syntax [see the GitHub Markdown help page](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).
+
+You can use `note`, `tip`, `warning` and `danger` in triple backticks to add a note, tip, warning or danger box.
+
+```danger
+Do not use vitepress specific markdown syntax `::: warning` as it will not be processed correctly.
+```
+
+Here are a few examples:
+
+````markdown
+```note
+This is a note
+```
+
+```tip
+This is a tip
+```
+
+```warning
+This is a warning
+```
+
+```danger
+This is a danger alert
+```
+````
+
+```note
+This is a note
+```
+
+```tip
+This is a tip
+```
+
+```warning
+This is a warning
+```
+
+```danger
+This is a danger alert
+```
+
+### Navigation
+
+If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation**, which is defined in [the vitepress config](../.vitepress/config.ts). The same goes to **topbar**.
+
+### Build Docs
+
+The content of `/docs` folder is built with Github Actions.
+
+```warning
+So as to allow automatic compilation of documentation pages you have to enable Github Actions on your fork first
+```
+
+## Submit your pull request
+
+````note
+Do not forget to push your changes
+
+```bash
+git push -u origin docs/2910_update-guidelines
+```
+````
+
+We make all changes via Pull Requests (PRs). Open a new one.
+
+Right now we are not following any strict rules about naming PRs. Give it a representative title and short description. There is also a [pull request template](https://github.com/mermaid-js/mermaid/blob/develop/.github/pull_request_template.md) which will help you with it.
+
+In case in its description contains a [magic comment](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) your PR will be automatically attached to the issue:
+
+```markdown
+Resolves #
+```
+
+## Congratulations
+
+You have successfully submitted your improvements! What is next?
+
+- PRs will be reviewed by active maintainers, who will provide feedback and request changes as needed.
+- The maintainers will request a review from _knsv_, if necessary.
+- Once the PR is approved, the maintainers will merge the PR into the `develop` branch.
+- When a release is ready, the `release/x.x.x` branch will be created, extensively tested and knsv will be in charge of the release process.
+
+Thanks for you help!
+
+
diff --git a/packages/mermaid/src/docs/community/development.md b/packages/mermaid/src/docs/community/development.md
deleted file mode 100644
index fc11a1f6c0..0000000000
--- a/packages/mermaid/src/docs/community/development.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# Contributing to Mermaid
-
-> The following documentation describes how to work with Mermaid in your host environment.
-> There's also a [Docker installation guide](../community/docker-development.md)
-> if you prefer to work in a Docker environment.
-
-So you want to help? That's great!
-
-![Image of happy people jumping with excitement](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif)
-
-Here are a few things to get you started on the right path.
-
-## Get the Source Code
-
-In GitHub, you first **fork** a repository when you are going to make changes and submit pull requests.
-
-Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
-
-[Fork mermaid](https://github.com/mermaid-js/mermaid/fork) to start contributing to the main project and its documentation, or [search for other repositories](https://github.com/orgs/mermaid-js/repositories).
-
-[Here is a GitHub document that gives an overview of the process.](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
-
-## Technical Requirements
-
-> The following documentation describes how to work with Mermaid in your host environment.
-> There's also a [Docker installation guide](../community/docker-development.md)
-> if you prefer to work in a Docker environment.
-
-These are the tools we use for working with the code and documentation:
-
-- [volta](https://volta.sh/) to manage node versions.
-- [Node.js](https://nodejs.org/en/). `volta install node`
-- [pnpm](https://pnpm.io/) package manager. `volta install pnpm`
-- [npx](https://docs.npmjs.com/cli/v8/commands/npx) the packaged executor in npm. This is needed [to install pnpm.](#install-packages)
-
-Follow the setup steps below to install them and start the development.
-
-## Setup and Launch
-
-### Switch to project
-
-Once you have cloned the repository onto your development machine, change into the `mermaid` project folder (the top level directory of the mermaid project repository)
-
-```bash
-cd mermaid
-```
-
-### Install packages
-
-Run `npx pnpm install`. You will need `npx` for this because volta doesn't support it yet.
-
-```bash
-npx pnpm install # npx is required for first install
-```
-
-### Launch
-
-```bash
-npx pnpm run dev
-```
-
-Now you are ready to make your changes! Edit whichever files in `src` as required.
-
-Open in your browser, after starting the dev server.
-There is a list of demos that can be used to see and test your changes.
-
-If you need a specific diagram, you can duplicate the `example.html` file in `/demos/dev` and add your own mermaid code to your copy.
-
-That will be served at .
-After making code changes, the dev server will rebuild the mermaid library. You will need to reload the browser page yourself to see the changes. (PRs for auto reload are welcome!)
-
-## Verify Everything is Working
-
-You can run the `test` script to verify that pnpm is working _and_ that the repository has been cloned correctly:
-
-```bash
-pnpm test
-```
-
-The `test` script and others are in the top-level `package.json` file.
-
-All tests should run successfully without any errors or failures. (You might see _lint_ or _formatting_ warnings; those are ok during this step.)
-
-## Last Words
-
-Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So, if you get stuck, ask for help and hints in the Slack forum. If you want to show off something good, show it off there.
-
-[Join our Slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
-
-![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif)
diff --git a/packages/mermaid/src/docs/community/docker-development.md b/packages/mermaid/src/docs/community/docker-development.md
deleted file mode 100644
index 89e08b3f70..0000000000
--- a/packages/mermaid/src/docs/community/docker-development.md
+++ /dev/null
@@ -1,104 +0,0 @@
-# Contributing to Mermaid via Docker
-
-> The following documentation describes how to work with Mermaid in a Docker environment.
-> There's also a [host installation guide](../community/development.md)
-> if you prefer to work without a Docker environment.
-
-So you want to help? That's great!
-
-![Image of happy people jumping with excitement](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif)
-
-Here are a few things to get you started on the right path.
-
-## Get the Source Code
-
-In GitHub, you first **fork** a repository when you are going to make changes and submit pull requests.
-
-Then you **clone** a copy to your local development machine (e.g. where you code) to make a copy with all the files to work with.
-
-[Fork mermaid](https://github.com/mermaid-js/mermaid/fork) to start contributing to the main project and its documentation, or [search for other repositories](https://github.com/orgs/mermaid-js/repositories).
-
-[Here is a GitHub document that gives an overview of the process.](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
-
-## Technical Requirements
-
-> The following documentation describes how to work with Mermaid in a Docker environment.
-> There's also a [host installation guide](../community/development.md)
-> if you prefer to work without a Docker environment.
-
-[Install Docker](https://docs.docker.com/engine/install/). And that is pretty much all you need.
-
-Optionally, to run GUI (Cypress) within Docker you will also need an X11 server installed.
-You might already have it installed, so check this by running:
-
-```bash
-echo $DISPLAY
-```
-
-If the `$DISPLAY` variable is not empty, then an X11 server is running. Otherwise you may need to install one.
-
-## Setup and Launch
-
-### Switch to project
-
-Once you have cloned the repository onto your development machine, change into the `mermaid` project folder (the top level directory of the mermaid project repository)
-
-```bash
-cd mermaid
-```
-
-### Make `./run` executable
-
-For development using Docker there is a self-documented `run` bash script, which provides convenient aliases for `docker compose` commands.
-
-Ensure `./run` script is executable:
-
-```bash
-chmod +x run
-```
-
-```tip
-To get detailed help simply type `./run` or `./run help`.
-
-It also has short _Development quick start guide_ embedded.
-```
-
-### Install packages
-
-```bash
-./run pnpm install # Install packages
-```
-
-### Launch
-
-```bash
-./run dev
-```
-
-Now you are ready to make your changes! Edit whichever files in `src` as required.
-
-Open in your browser, after starting the dev server.
-There is a list of demos that can be used to see and test your changes.
-
-If you need a specific diagram, you can duplicate the `example.html` file in `/demos/dev` and add your own mermaid code to your copy.
-
-That will be served at .
-After making code changes, the dev server will rebuild the mermaid library. You will need to reload the browser page yourself to see the changes. (PRs for auto reload are welcome!)
-
-## Verify Everything is Working
-
-```bash
-./run pnpm test
-```
-
-The `test` script and others are in the top-level `package.json` file.
-
-All tests should run successfully without any errors or failures. (You might see _lint_ or _formatting_ warnings; those are ok during this step.)
-
-## Last Words
-
-Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So, if you get stuck, ask for help and hints in the Slack forum. If you want to show off something good, show it off there.
-
-[Join our Slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
-
-![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif)
diff --git a/packages/mermaid/src/docs/community/documentation.md b/packages/mermaid/src/docs/community/documentation.md
deleted file mode 100644
index 6a0df983d1..0000000000
--- a/packages/mermaid/src/docs/community/documentation.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# Contributing Documentation
-
-**_[TODO: This section is still a WIP. It still needs MAJOR revision.]_**
-
-If it is not in the documentation, it's like it never happened. Wouldn't that be sad? With all the effort that was put into the feature?
-
-The docs are located in the `packages/mermaid/src/docs` folder and are written in Markdown. Just pick the right section and start typing.
-
-The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch.
-Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published.
-
-## How to Contribute to Documentation
-
-We are a little less strict here, it is OK to commit directly in the `develop` branch if you are a collaborator.
-
-The documentation is located in the `packages/mermaid/src/docs` directory and organized according to relevant subfolder.
-
-The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually.
-
-```mermaid
-flowchart LR
- classDef default fill:#fff,color:black,stroke:black
-
- source["files in /packages/mermaid/src/docs\n(changes should be done here)"] -- automatic processing\nto generate the final documentation--> published["files in /docs\ndisplayed on the official documentation site"]
-
-```
-
-You can use `note`, `tip`, `warning` and `danger` in triple backticks to add a note, tip, warning or danger box.
-Do not use vitepress specific markdown syntax `::: warning` as it will not be processed correctly.
-
-````markdown
-```note
-Note content
-```
-
-```tip
-Tip content
-```
-
-```warning
-Warning content
-```
-
-```danger
-Danger content
-```
-````
-
-```note
-If the change is _only_ to the documentation, you can get your changes published to the site quicker by making a PR to the `master` branch. In that case, your branch should be based on master, not develop.
-```
-
-We encourage contributions to the documentation at [packages/mermaid/src/docs in the _develop_ branch](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs).
-
-**_DO NOT CHANGE FILES IN `/docs`_**
-
-## The official documentation site
-
-**[The mermaid documentation site](https://mermaid.js.org/) is powered by [Vitepress](https://vitepress.vuejs.org/).**
-
-To run the documentation site locally:
-
-1. Run `pnpm --filter mermaid run docs:dev` to start the dev server. (Or `pnpm docs:dev` inside the `packages/mermaid` directory.)
-2. Open [http://localhost:3333/](http://localhost:3333/) in your browser.
-
-Markdown is used to format the text, for more information about Markdown [see the GitHub Markdown help page](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).
-
-To edit Docs on your computer:
-
-_[TODO: need to keep this in sync with [check out a git branch in Contributing Code above](#1-checkout-a-git-branch) ]_
-
-1. Create a fork of the develop branch to work on.
-2. Find the Markdown file (.md) to edit in the `packages/mermaid/src/docs` directory.
-3. Make changes or add new documentation.
-4. Commit changes to your branch and push it to GitHub (which should create a new branch).
-5. Create a Pull Request from the branch of your fork.
-
-To edit Docs on GitHub:
-
-1. Login to [GitHub.com](https://www.github.com).
-2. Navigate to [packages/mermaid/src/docs](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) in the mermaid-js repository.
-3. To edit a file, click the pencil icon at the top-right of the file contents panel.
-4. Describe what you changed in the **Propose file change** section, located at the bottom of the page.
-5. Submit your changes by clicking the button **Propose file change** at the bottom (by automatic creation of a fork and a new branch).
-6. Visit the Actions tab in Github, `https://github.com//mermaid/actions` and enable the actions for your fork. This will ensure that the documentation is built and updated in your fork.
-7. Create a Pull Request of your newly forked branch by clicking the green **Create Pull Request** button.
-
-## Documentation organization: Sidebar navigation
-
-If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation.**
-
-The sidebar navigation is defined in [the vitepress configuration file config.ts](../.vitepress/config.ts).
diff --git a/packages/mermaid/src/docs/community/intro.md b/packages/mermaid/src/docs/community/intro.md
new file mode 100644
index 0000000000..a83b96380b
--- /dev/null
+++ b/packages/mermaid/src/docs/community/intro.md
@@ -0,0 +1,58 @@
+# Getting Started
+
+So you want to help? That's great!
+
+![Image of happy people jumping with excitement](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif)
+
+Here are a few things to get you started on the right path.
+
+## How can I help?
+
+```mermaid-nocode
+mindmap
+ root)Contributing(
+ Development
+ Solving issues
+ Adding new diagrams
+ Handling pull requests
+ Updating tooling
+ Testing
+ Verification of fixed issues
+ Regression testing in connection with releases
+ Testing pull requests
+ Management
+ Coordinating the work
+ Classification and monitoring of incoming issues
+```
+
+## Join the Development
+
+```tip
+**Check out our** [**detailed contribution guide**](./contributing.md).
+```
+
+Where to start:
+
+- You could start getting some knowledge of the code base by working on [these "good first issues"](https://github.com/mermaid-js/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22+).
+- You could jump right in and help us fix any of [these bugs](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug+%2F+Error%22++label%3A%22Contributor+needed%22+)!
+- You could help write and [improve the documentation](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Area%3A+Documentation%22).
+- You could work on a new feature! [These](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Area%3A+Development%22+label%3A%22Type%3A+Enhancement%22+label%3A%22Status%3A+Approved%22+) are some ideas!
+- You could confirm the bugs in [these issues](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Triage%22++label%3A%22Type%3A+Bug+%2F+Error%22).
+
+[You can join our Discord server if you want closer contact!](https://discord.gg/AgrbSrBer3)
+
+## A Question Or a Suggestion?
+
+```tip
+**Have a look at** [**how to open an issue**](./questions-and-suggestions.md).
+```
+
+If you have faced a vulnerability [report it to us](./security.md).
+
+## Last Words
+
+Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So, if you get stuck, ask for help and hints in the Slack forum. If you want to show off something good, show it off there.
+
+[You can join our Discord server if you want closer contact!](https://discord.gg/AgrbSrBer3)
+
+![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif)
diff --git a/packages/mermaid/src/docs/community/newDiagram.md b/packages/mermaid/src/docs/community/new-diagram-jison.md
similarity index 97%
rename from packages/mermaid/src/docs/community/newDiagram.md
rename to packages/mermaid/src/docs/community/new-diagram-jison.md
index bc43475bfc..4a9020ba84 100644
--- a/packages/mermaid/src/docs/community/newDiagram.md
+++ b/packages/mermaid/src/docs/community/new-diagram-jison.md
@@ -1,4 +1,10 @@
-# Adding a New Diagram/Chart 📊
+# Adding a New Diagram/Chart (Deprecated) 📊
+
+```warning
+JISON grammars are deprecated in mermaid. Please use Langium instead. See [New Diagram](./new-diagram.md) for more information.
+
+**New diagrams with JISON grammars will not be accepted.**
+```
### Step 1: Grammar & Parsing
diff --git a/packages/mermaid/src/docs/community/new-diagram.md b/packages/mermaid/src/docs/community/new-diagram.md
new file mode 100644
index 0000000000..16504ca322
--- /dev/null
+++ b/packages/mermaid/src/docs/community/new-diagram.md
@@ -0,0 +1,108 @@
+# Adding a New Diagram/Chart 📊
+
+### Examples
+
+Please refer to the following PRs on how to use Langium to add a new diagram grammar.
+
+- https://github.com/mermaid-js/mermaid/pull/4839
+- https://github.com/mermaid-js/mermaid/pull/4751
+
+```warning
+The below steps are a work in progress and will be updated soon.
+```
+
+### Step 1: Grammar & Parsing
+
+### Step 2: Rendering
+
+Write a renderer that given the data found during parsing renders the diagram. To look at an example look at sequenceRenderer.js rather than the flowchart renderer as this is a more generic example.
+
+Place the renderer in the diagram folder.
+
+### Step 3: Detection of the new diagram type
+
+The second thing to do is to add the capability to detect the new diagram to type to the detectType in `diagram-api/detectType.ts`. The detection should return a key for the new diagram type.
+[This key will be used to as the aria roledescription](#aria-roledescription), so it should be a word that clearly describes the diagram type.
+For example, if your new diagram uses a UML deployment diagram, a good key would be "UMLDeploymentDiagram" because assistive technologies such as a screen reader
+would voice that as "U-M-L Deployment diagram." Another good key would be "deploymentDiagram" because that would be voiced as "Deployment Diagram." A bad key would be "deployment" because that would not sufficiently describe the diagram.
+
+Note that the diagram type key does not have to be the same as the diagram keyword chosen for the [grammar](#grammar), but it is helpful if they are the same.
+
+### Common parts of a diagram
+
+There are a few features that are common between the different types of diagrams. We try to standardize the diagrams that work as similar as possible for the end user. The commonalities are:
+
+- Directives, a way of modifying the diagram configuration from within the diagram code.
+- Accessibility, a way for an author to provide additional information like titles and descriptions to people accessing a text with diagrams using a screen reader.
+- Themes, there is a common way to modify the styling of diagrams in Mermaid.
+- Comments should follow mermaid standards
+
+Here are some pointers on how to handle these different areas.
+
+## Accessibility
+
+Mermaid automatically adds the following accessibility information for the diagram SVG HTML element:
+
+- aria-roledescription
+- accessible title
+- accessible description
+
+### aria-roledescription
+
+The aria-roledescription is automatically set to [the diagram type](#step-3--detection-of-the-new-diagram-type) and inserted into the SVG element.
+
+See [the definition of aria-roledescription](https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription) in [the Accessible Rich Internet Applications W3 standard.](https://www.w3.org/WAI/standards-guidelines/aria/)
+
+### accessible title and description
+
+The syntax for accessible titles and descriptions is described in [the Accessibility documentation section.](../config/accessibility.md)
+
+The functions for setting title and description are provided by a common module. This is the import in flowDb.js:
+
+```
+import {
+ setAccTitle,
+ getAccTitle,
+ getAccDescription,
+ setAccDescription,
+ clear as commonClear,
+} from '../../commonDb';
+```
+
+The accessibility title and description are inserted into the SVG element in the `render` function in mermaidAPI.
+
+## Theming
+
+Mermaid supports themes and has an integrated theming engine. You can read more about how the themes can be used [in the docs](../config/theming.md).
+
+When adding themes to a diagram it comes down to a few important locations in the code.
+
+The entry point for the styling engine is in **src/styles.js**. The getStyles function will be called by Mermaid when the styles are being applied to the diagram.
+
+This function will in turn call a function _your diagram should provide_ returning the css for the new diagram. The diagram specific, also which is commonly also called getStyles and located in the folder for your diagram under src/diagrams and should be named styles.js. The getStyles function will be called with the theme options as an argument like in the following example:
+
+```js
+const getStyles = (options) =>
+ `
+ .line {
+ stroke-width: 1;
+ stroke: ${options.lineColor};
+ stroke-dasharray: 2;
+ }
+ // ...
+ `;
+```
+
+Note that you need to provide your function to the main getStyles by adding it into the themes object in **src/styles.js** like in the xyzDiagram in the provided example:
+
+```js
+const themes = {
+ flowchart,
+ 'flowchart-v2': flowchart,
+ sequence,
+ xyzDiagram,
+ //...
+};
+```
+
+The actual options and values for the colors are defined in **src/theme/theme-[xyz].js**. If you provide the options your diagram needs in the existing theme files then the theming will work smoothly without hiccups.
diff --git a/packages/mermaid/src/docs/community/questions-and-suggestions.md b/packages/mermaid/src/docs/community/questions-and-suggestions.md
index 386e3753a1..6408d7fed1 100644
--- a/packages/mermaid/src/docs/community/questions-and-suggestions.md
+++ b/packages/mermaid/src/docs/community/questions-and-suggestions.md
@@ -1,19 +1,19 @@
# Questions or Suggestions?
-**_[TODO: This section is still a WIP. It still needs MAJOR revision.]_**
+## Search for Existing Issue
-## First search to see if someone has already asked (and hopefully been answered) or suggested the same thing.
+First search to see if someone has already asked (and hopefully been answered) or suggested the same thing.
- [Search in Discussions](https://github.com/orgs/mermaid-js/discussions)
- [Search in Issues (Open & Closed)](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue)
If you find an open issue or discussion thread that is similar to your question but isn't answered, you can let us know that you are also interested in it.
-Use the GitHub reactions to add a thumbs-up to the issue or discussion thread.
+Use the GitHub reactions to add a thumbs-up to the issue or discussion thread, or append to the issue if needed.
This helps the team know the relative interest in something and helps them set priorities and assignments.
-Feel free to add to the discussion on the issue or topic.
+## Add a new Issue
-If you can't find anything that already addresses your question or suggestion, _open a new issue:_
+You have not found anything that already addresses your request, or maybe you have come up with the new idea? Feel free to open a new issue or discussion.
-Log in to [GitHub.com](https://www.github.com), open or append to an issue [using the GitHub issue tracker of the mermaid-js repository](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Area%3A+Documentation%22).
+Log in to [GitHub.com](https://www.github.com), and use [GitHub issue tracker of the mermaid-js repository](https://github.com/mermaid-js/mermaid/issues). Press [https://github.com/mermaid-js/mermaid/issues/new/choose] issue, select the appropriate template and describe your problem.
diff --git a/packages/mermaid/src/docs/community/security.md b/packages/mermaid/src/docs/community/security.md
index e7a0db6edb..a84a106ab3 100644
--- a/packages/mermaid/src/docs/community/security.md
+++ b/packages/mermaid/src/docs/community/security.md
@@ -10,7 +10,7 @@ We aim to reply within three working days, probably much sooner.
You should expect a close collaboration as we work to resolve the issue you have reported. Please reach out to again if you do not receive prompt attention and regular updates.
-You may also reach out to the team via our public Slack chat channels; however, please make sure to e-mail when reporting an issue, and avoid revealing information about vulnerabilities in public as that could that could put users at risk.
+You may also reach out to the team via our public Discord chat channels; however, please make sure to e-mail when reporting an issue, and avoid revealing information about vulnerabilities in public as that could that could put users at risk.
## Best practices
diff --git a/packages/mermaid/src/docs/config/accessibility.md b/packages/mermaid/src/docs/config/accessibility.md
index 559c739874..b53567f730 100644
--- a/packages/mermaid/src/docs/config/accessibility.md
+++ b/packages/mermaid/src/docs/config/accessibility.md
@@ -13,7 +13,7 @@ Mermaid will automatically insert the [aria-roledescription](#aria-roledescripti
The [aria-roledescription](https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription) for the SVG HTML element is set to the diagram type key. (Note this may be slightly different than the keyword used for the diagram in the diagram text.)
-For example: The diagram type key for a state diagram is "stateDiagram". Here (a part of) the HTML of the SVG tag that shows the automatically inserted aria-roledscription set to "stateDiagram". _(Note that some of the SVG attributes and the SVG contents are omitted for clarity.):_
+For example: The diagram type key for a state diagram is "stateDiagram". Here (a part of) the HTML of the SVG tag that shows the automatically inserted aria-roledescription set to "stateDiagram". _(Note that some of the SVG attributes and the SVG contents are omitted for clarity.):_
```html