You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/configuration.md
+32-1
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,41 @@ When mermaid starts, configuration is extracted to determine a configuration to
10
10
11
11
- The default configuration
12
12
- Overrides at the site level are set by the initialize call, and will be applied to all diagrams in the site/app. The term for this is the **siteConfig**.
13
-
- Directives - diagram authors can update select configuration parameters directly in the diagram code via directives. These are applied to the render config.
13
+
- Frontmatter (v\<MERMAID_RELEASE_VERSION>+) - diagram authors can update select configuration parameters in the frontmatter of the diagram. These are applied to the render config.
14
+
- Directives (Deprecated by Frontmatter) - diagram authors can update select configuration parameters directly in the diagram code via directives. These are applied to the render config.
14
15
15
16
**The render config** is configuration that is used when rendering by applying these configurations.
16
17
18
+
## Frontmatter config
19
+
20
+
The entire mermaid configuration (except the secure configs) can be overridden by the diagram author in the frontmatter of the diagram. The frontmatter is a YAML block at the top of the diagram.
Copy file name to clipboardExpand all lines: docs/config/directives.md
+3
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@
6
6
7
7
# Directives
8
8
9
+
> **Warning**
10
+
> Directives are deprecated from v\<MERMAID_RELEASE_VERSION>. Please use the `config` key in frontmatter to pass configuration. See [Configuration](./configuration.md) for more details.
11
+
9
12
## Directives
10
13
11
14
Directives give a diagram author the capability to alter the appearance of a diagram before rendering by changing the applied configuration.
0 commit comments