- ```
-
**Using a code fence with `mermaid` language specifier**:
````markdown
@@ -287,6 +275,18 @@ document using either of the following methods:
C-->D;
```
````
+
+**Using a `
` block with `mermaid` class**:
+
+ ```html
+
+ graph TD;
+ A-->B;
+ A-->C;
+ B-->D;
+ C-->D;
+
+ ```
### Table of Contents Generation
diff --git a/lib/madness/settings.rb b/lib/madness/settings.rb
index 73e3fa7..4e780cd 100644
--- a/lib/madness/settings.rb
+++ b/lib/madness/settings.rb
@@ -63,7 +63,7 @@ def defaults
auto_nav: true,
auto_toc: true,
highlighter: true,
- mermaid: false,
+ mermaid: true,
copy_code: true,
shortlinks: false,
source_link: nil,
diff --git a/lib/madness/templates/madness.yml b/lib/madness/templates/madness.yml
index 0d5eafb..247928b 100644
--- a/lib/madness/templates/madness.yml
+++ b/lib/madness/templates/madness.yml
@@ -43,8 +43,8 @@ auto_toc: true
highlighter: true
# enable mermaid diagramming and charting
-# put your diagram code inside
...
-mermaid: false
+# put your diagram code inside ```mermaid ... ``` code fence
+mermaid: true
# enable the copy to clipboard icon for code snippets
copy_code: true
diff --git a/site/index.html b/site/index.html
index ce26032..b0ba969 100644
--- a/site/index.html
+++ b/site/index.html
@@ -172,8 +172,8 @@
Configuration File
highlighter: true
# enable mermaid diagramming and charting
-
# put your diagram code inside <div class='mermaid'>...</div>
-
mermaid: false
+
# put your diagram code inside ```mermaid ... ``` code fence
+
mermaid: true
# enable the copy to clipboard icon for code snippets
copy_code: true
@@ -284,15 +284,6 @@
Mermaid Diagrams and Charts
When the mermaid option is enabled, you can embed Mermaid diagrams in your
document using either of the following methods:
-
Using a <div> block with mermaid class:
-
<div class="mermaid">
- graph TD;
- A-->B;
- A-->C;
- B-->D;
- C-->D;
- </div>
-
Using a code fence with mermaid language specifier:
```mermaid
graph TD;
@@ -302,6 +293,15 @@ Mermaid Diagrams and Charts
C-->D;
```
+
Using a <div> block with mermaid class:
+
<div class="mermaid">
+ graph TD;
+ A-->B;
+ A-->C;
+ B-->D;
+ C-->D;
+ </div>
+
Table of Contents Generation
Site-wide
diff --git a/spec/approvals/cli/config/show b/spec/approvals/cli/config/show
index 56656aa..5a0ed1a 100644
--- a/spec/approvals/cli/config/show
+++ b/spec/approvals/cli/config/show
@@ -9,7 +9,7 @@
auto_nav: true
auto_toc: true
highlighter: true
- mermaid: ~
+ mermaid: true
copy_code: true
shortlinks: ~
source_link: ~
diff --git a/spec/approvals/cli/config/show-non-default b/spec/approvals/cli/config/show-non-default
index 1236784..31ae9bc 100644
--- a/spec/approvals/cli/config/show-non-default
+++ b/spec/approvals/cli/config/show-non-default
@@ -9,7 +9,7 @@
auto_nav: true
auto_toc: true
highlighter: true
- mermaid: ~
+ mermaid: true
copy_code: true
shortlinks: ~
source_link: ~
diff --git a/spec/approvals/render/all-disabled b/spec/approvals/render/all-disabled
index a8fb499..96c6823 100644
--- a/spec/approvals/render/all-disabled
+++ b/spec/approvals/render/all-disabled
@@ -12,12 +12,10 @@ with
markdown support in it
Inline code_word and block code:
-
-
def say(message = "Hi")
- puts message
-end
-
-
+
def say(message = "Hi")
+ puts message
+end
+
This needs a footnote explanation1
@@ -112,14 +110,12 @@ graph TD;