stën

    • Login
    • Search
    • Back to Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    nodebb-plugin-mermaid

    Projects
    1
    1
    606
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      exile last edited by exile

      NodeBB-plugin-mermaid

      Project home: https://github.com/exsilium/nodebb-plugin-mermaid
      NodeBB community post: https://community.nodebb.org/topic/10568/nodebb-mermaid-parser-nodebb-plugin-mermaid

      Test samples

      Testing the samples from Mermaid demo page:

      graph TD;
          A-->B;
          A-->C;
          B-->D;
          C-->D;
      
      graph TD; A-->B; A-->C; B-->D; C-->D;
      %% Example diagram
      graph LR
          A[Square Rect] -- Link text --> B((Circle))
          A --> C(Round Rect)
          B --> D{Rhombus}
          C --> D
      
      %% Example diagram graph LR A[Square Rect] -- Link text --> B((Circle)) A --> C(Round Rect) B --> D{Rhombus} C --> D
      %% Sequence diagram code
      sequenceDiagram
          Alice ->> Bob: Hello Bob, how are you?
          Bob-->>John: How about you John?
          Bob--x Alice: I am good thanks!
          Bob-x John: I am good thanks!
          Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
      
          Bob-->Alice: Checking with John...
          Alice->John: Yes... John, how are you?
      
      %% Sequence diagram code sequenceDiagram Alice ->> Bob: Hello Bob, how are you? Bob-->>John: How about you John? Bob--x Alice: I am good thanks! Bob-x John: I am good thanks! Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row. Bob-->Alice: Checking with John... Alice->John: Yes... John, how are you?
      %% Sequence diagram code
      sequenceDiagram
          loop Daily query
              Alice->>Bob: Hello Bob, how are you?
              alt is sick
                  Bob->>Alice: Not so good :(
              else is well
                  Bob->>Alice: Feeling fresh like a daisy
              end
      
              opt Extra response
                  Bob->>Alice: Thanks for asking
              end
          end
      
      %% Sequence diagram code sequenceDiagram loop Daily query Alice->>Bob: Hello Bob, how are you? alt is sick Bob->>Alice: Not so good :( else is well Bob->>Alice: Feeling fresh like a daisy end opt Extra response Bob->>Alice: Thanks for asking end end
      %% Sequence diagram code
      sequenceDiagram
          participant Alice
          participant Bob
          Alice->>John: Hello John, how are you?
          loop Healthcheck
              John->>John: Fight against hypochondria
          end
          Note right of John: Rational thoughts<br/>prevail...
          John-->>Alice: Great!
          John->>Bob: How about you?
          Bob-->>John: Jolly good!
      
      %% Sequence diagram code sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts<br/>prevail... John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!
      gantt
              dateFormat  YYYY-MM-DD
              title Adding GANTT diagram functionality to mermaid
              section A section
              Completed task            :done,    des1, 2014-01-06,2014-01-08
              Active task               :active,  des2, 2014-01-09, 3d
              Future task               :         des3, after des2, 5d
              Future task2               :         des4, after des3, 5d
              section Critical tasks
              Completed task in the critical line :crit, done, 2014-01-06,24h
              Implement parser and jison          :crit, done, after des1, 2d
              Create tests for parser             :crit, active, 3d
              Future task in critical line        :crit, 5d
              Create tests for renderer           :2d
              Add to mermaid                      :1d
      
      gantt dateFormat YYYY-MM-DD title Adding GANTT diagram functionality to mermaid section A section Completed task :done, des1, 2014-01-06,2014-01-08 Active task :active, des2, 2014-01-09, 3d Future task : des3, after des2, 5d Future task2 : des4, after des3, 5d section Critical tasks Completed task in the critical line :crit, done, 2014-01-06,24h Implement parser and jison :crit, done, after des1, 2d Create tests for parser :crit, active, 3d Future task in critical line :crit, 5d Create tests for renderer :2d Add to mermaid :1d
      1 Reply Last reply Reply Quote 0
      • First post
        Last post