Diagrams

Diagrams allow you to visualize concepts and relationships in your documentation using graphical representations.

The theme supports Mermaid diagrams using the sphinx-immaterial extension, which provides an easy way to generate various types of diagrams.

Example

Flowchart

graph LR
    A[Start] --> B{Error?};
    B -->|Yes| C[Hmm...];
    C --> D[Debug];
    D --> B;
    B ---->|No| E[Yay!];

Sequence diagram

    sequenceDiagram
      participant Alice
      participant Bob
      Alice->John: Hello John, how are you?

Class diagram

classDiagram
    Person <|-- Student
    Person <|-- Professor
    Person : +String name
    Person : +String phoneNumber
    Person : +String emailAddress
    Person: +purchaseParkingPass()
    Address "1" <-- "0..1" Person:lives at
    class Student{
        +int studentNumber
        +int averageMark
        +isEligibleToEnrol()
        +getSeminarsTaken()
    }
    class Professor{
        +int salary
    }
    class Address{
        +String street
        +String city
        +String state
        +int postalCode
        +String country
        -validate()
        +outputAsLabel()
    }

Last update: 29 Jan 2025