Skip to content

Instantly share code, notes, and snippets.

@nbogie
Last active June 5, 2023 12:23
Show Gist options
  • Save nbogie/96860aed89c2148fe5fec71d22455a26 to your computer and use it in GitHub Desktop.
Save nbogie/96860aed89c2148fe5fec71d22455a26 to your computer and use it in GitHub Desktop.
github-markdown-support-for-mermaid-diagrams.md

flow diagram

flowchart TD
    A[Start] --> B{Is it?}
    B -->|Yes| C[OK]
    C --> D[Rethink]
    D --> B
    B ---->|No| E[End]
Loading

git branching graph

    gitGraph
       commit
       commit
       branch develop
       commit
       commit
       commit
       checkout main
       commit
       commit
Loading

State transition diagram

stateDiagram-v2
    [*] --> Still
    Still --> [*]

    Still --> Moving
    Moving --> Still
    Moving --> Crash
    Crash --> [*]
Loading

Entity relationship diagram

erDiagram
    CAR ||--o{ NAMED-DRIVER : allows
    CAR {
        string allowedDriver FK "The license of the allowed driver"
        string registrationNumber
        string make
        string model
    }
    PERSON ||--o{ NAMED-DRIVER : is
    PERSON {
        string driversLicense PK "The license #"
        string firstName
        string lastName
        int age
    }
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment