Remora / Remora.Discord

A data-oriented C# Discord library, focused on high-performance concurrency and robust design.
GNU Lesser General Public License v3.0
246 stars 44 forks source link

Add support for Mermaid diagrams in docs #291

Closed MazeXP closed 1 year ago

MazeXP commented 1 year ago

Redid the PR about rendering Mermaid diagram in docs.

Nihlus commented 1 year ago

Can you include a screenshot in the PR of how the diagrams look integrated into the docs?

MazeXP commented 1 year ago

Following markdown results in the below:

## Quick Start Notes:
1. Add images to the *images* folder if the file is referencing an image.

```mermaid
flowchart TB
    Start[Start] --> EventReceived(Message or Interaction Event Received)
    EventReceived --> PrepareCommand("Prepare Command (A)")
    PrepareCommand --> IsSuccess{{IsSucess}}
    IsSuccess -->|true| RunPreExecEvents("Run Pre-Execution Events (A)")
        RunPreExecEvents --> ExecPrepCommand("Execute Prepared Command (A)")
        ExecPrepCommand --> RunPostExecEvents("Run Post-Execution Events (A)")
    IsSuccess -->|false| RunPrepErrorEvents("Run Preparation Error Events (A)")
    RunPostExecEvents --> X{<s></s>}
    RunPrepErrorEvents --> X
    X --> End[End]


![image](https://user-images.githubusercontent.com/26042705/226463280-ae3641ce-62c9-4211-9bd9-43607c5477f5.png)
MazeXP commented 1 year ago

An alternative view of the diagram would be having them with a background: image