Jump to content

Template:Mermaid: Difference between revisions

From NixOS Wiki
DoggoBit (talk | contribs)
Created page with "<includeonly>{{#mermaid:{{{1}}}|{{{config|}}}}}</includeonly><noinclude>{{Documentation}}</noinclude>"
 
DoggoBit (talk | contribs)
Fix syntax error, split into cases
 
Line 1: Line 1:
<includeonly>{{#mermaid:{{{1}}}|{{{config|}}}}}</includeonly><noinclude>{{Documentation}}</noinclude>
<includeonly>{{#if:{{{config|}}}|{{#mermaid:{{{1}}};
{{{2}}}
|{{{config}}}}}|{{#mermaid:{{{1}}};
{{{2}}}
}}}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 15:10, 11 June 2025

Template Documentation [edit source| uses| help]

This template is used to display Mermaid charts. For more information about the Mermaid syntax, see the Mermaid reference documentation.

{{#mermaid:flowchart LR;

 C[Create a template]
 S[Save your edit]
 N[Notice a syntax error]
 E[Edit your template]
 C --> S
 S --> N
 N --> E
 E --> S

}}

Usage

Simply include this template on a page, specifying the type of chart as the first argument, and supplying the content of the chart as its second argument:

{{mermaid|flowchart LR|
  C[Create a template]
  S[Save your edit]
  N[Notice a syntax error]
  E[Edit your template]
  C --> S
  S --> N
  N --> E
  E --> S
}}