Merge pull request #143 from terrastruct/alixander/readme

readme: update
This commit is contained in:
Alexander Wang 2022-11-22 09:36:54 -08:00 committed by GitHub
commit 65cf699b25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View file

@ -20,6 +20,7 @@
<!-- toc --> <!-- toc -->
- [What does D2 look like?](#what-does-d2-look-like)
- [Quickstart](#quickstart) - [Quickstart](#quickstart)
- [Install](#install) - [Install](#install)
- [D2 as a library](#d2-as-a-library) - [D2 as a library](#d2-as-a-library)
@ -39,6 +40,36 @@
<!-- tocstop --> <!-- tocstop -->
# What does D2 look like?
```d2
# Actors
hans: Hans Niemann
defendants: {
mc: Magnus Carlsen
playmagnus: Play Magnus Group
chesscom: Chess.com
naka: Hikaru Nakamura
mc -> playmagnus: Owns majority
playmagnus <-> chesscom: Merger talks
chesscom -> naka: Sponsoring
}
# Accusations
hans -> defendants: 'sueing for $100M'
# Offense
defendants.naka -> hans: Accused of cheating on his stream
defendants.mc -> hans: Lost then withdrew with accusations
defendants.chesscom -> hans: 72 page report of cheating
```
> There is syntax highlighting with the editor plugins linked below.
<img src="./docs/assets/syntax.png" alt="D2 render example" width="50%" />
## Quickstart ## Quickstart
The most convenient way to use D2 is to just run it as a CLI executable to The most convenient way to use D2 is to just run it as a CLI executable to

BIN
docs/assets/syntax.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB