jekyll-diagrams 0.10.0 → 0.11.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -411
- data/features/{blockdiag/block.feature → blockdiag_block.feature} +0 -0
- data/features/{graphviz/block.feature → graphviz_block.feature} +0 -0
- data/features/{graphviz/config.feature → graphviz_config.feature} +0 -0
- data/features/{mermaid/block.feature → mermaid_block.feature} +0 -0
- data/features/{nomnoml/block.feature → nomnoml_block.feature} +0 -0
- data/features/{plantuml/block.feature → plantuml_block.feature} +0 -0
- data/features/{smcat/block.feature → smcat_block.feature} +0 -0
- data/features/step_definitions/{jekyll-diagrams.rb → diagrams.rb} +0 -0
- data/features/support/env.rb +4 -1
- data/features/{syntrax/block.feature → syntrax_block.feature} +0 -0
- data/features/{vega/block.feature → vega_block.feature} +0 -0
- data/features/{wavedrom/block.feature → wavedrom_block.feature} +0 -0
- data/lib/jekyll-diagrams.rb +1 -38
- data/lib/jekyll_diagrams.rb +85 -0
- data/lib/jekyll_diagrams/version.rb +5 -0
- data/spec/{utils_spec.rb → jekyll_diagrams_spec.rb} +18 -70
- data/spec/spec_helper.rb +10 -8
- metadata +85 -129
- data/lib/jekyll-diagrams/basic_block.rb +0 -28
- data/lib/jekyll-diagrams/basic_renderer.rb +0 -38
- data/lib/jekyll-diagrams/blockdiag.rb +0 -12
- data/lib/jekyll-diagrams/blockdiag/block.rb +0 -9
- data/lib/jekyll-diagrams/blockdiag/renderer.rb +0 -40
- data/lib/jekyll-diagrams/erd.rb +0 -10
- data/lib/jekyll-diagrams/erd/block.rb +0 -8
- data/lib/jekyll-diagrams/erd/renderer.rb +0 -34
- data/lib/jekyll-diagrams/errors.rb +0 -24
- data/lib/jekyll-diagrams/graphviz.rb +0 -10
- data/lib/jekyll-diagrams/graphviz/block.rb +0 -8
- data/lib/jekyll-diagrams/graphviz/renderer.rb +0 -40
- data/lib/jekyll-diagrams/mermaid.rb +0 -10
- data/lib/jekyll-diagrams/mermaid/block.rb +0 -8
- data/lib/jekyll-diagrams/mermaid/renderer.rb +0 -29
- data/lib/jekyll-diagrams/nomnoml.rb +0 -10
- data/lib/jekyll-diagrams/nomnoml/block.rb +0 -8
- data/lib/jekyll-diagrams/nomnoml/renderer.rb +0 -19
- data/lib/jekyll-diagrams/plantuml.rb +0 -10
- data/lib/jekyll-diagrams/plantuml/block.rb +0 -8
- data/lib/jekyll-diagrams/plantuml/renderer.rb +0 -23
- data/lib/jekyll-diagrams/rendering.rb +0 -67
- data/lib/jekyll-diagrams/smcat.rb +0 -10
- data/lib/jekyll-diagrams/smcat/block.rb +0 -8
- data/lib/jekyll-diagrams/smcat/renderer.rb +0 -30
- data/lib/jekyll-diagrams/svgbob.rb +0 -10
- data/lib/jekyll-diagrams/svgbob/block.rb +0 -8
- data/lib/jekyll-diagrams/svgbob/renderer.rb +0 -25
- data/lib/jekyll-diagrams/syntrax.rb +0 -10
- data/lib/jekyll-diagrams/syntrax/block.rb +0 -8
- data/lib/jekyll-diagrams/syntrax/renderer.rb +0 -27
- data/lib/jekyll-diagrams/utils.rb +0 -85
- data/lib/jekyll-diagrams/vega.rb +0 -12
- data/lib/jekyll-diagrams/vega/block.rb +0 -9
- data/lib/jekyll-diagrams/vega/renderer.rb +0 -33
- data/lib/jekyll-diagrams/version.rb +0 -7
- data/lib/jekyll-diagrams/wavedrom.rb +0 -10
- data/lib/jekyll-diagrams/wavedrom/block.rb +0 -8
- data/lib/jekyll-diagrams/wavedrom/renderer.rb +0 -19
- data/spec/basic_block_spec.rb +0 -70
- data/spec/basic_renderer_spec.rb +0 -69
- data/spec/blockdiag_renderer_spec.rb +0 -43
- data/spec/erd_renderer_spec.rb +0 -43
- data/spec/graphviz_renderer_spec.rb +0 -19
- data/spec/jekyll-diagrams_spec.rb +0 -23
- data/spec/mermaid_renderer_spec.rb +0 -19
- data/spec/nomnoml_renderer_spec.rb +0 -19
- data/spec/plantuml_renderer_spec.rb +0 -20
- data/spec/rendering_spec.rb +0 -111
- data/spec/smcat_renderer_spec.rb +0 -19
- data/spec/svgbob_renderer_spec.rb +0 -27
- data/spec/syntrax_renderer_spec.rb +0 -19
- data/spec/vega_renderer_spec.rb +0 -19
- data/spec/wavedrom_renderer_spec.rb +0 -19
- data/vendor/mermaid_puppeteer_config.json +0 -3
- data/vendor/plantuml.1.2020.1.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c05ad5b891c49be889b0cd7863bb51749df89d60e3e7ceef2082352592f685b
|
4
|
+
data.tar.gz: bb6b9315eac3c9df5302c9bf60775ffd6d76f794b4aba25ec89867b85af56fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a914e01964f644feae896ad105aa9867907d24b882cc786f08261897c488190d7c01f540f9946ee22e0bdf64db6d3890a018751c390a0086a10ee68aaff8caba
|
7
|
+
data.tar.gz: 025a693b41afd79be7a3f0e3b321a3b52f9c554d6b5cd4090525b935e159f203243d830d2beb5a078ad3f115f81cb5eefce6574a48eadebb1003aa36ef1f1f80
|
data/README.md
CHANGED
@@ -2,12 +2,26 @@
|
|
2
2
|
|
3
3
|
[![Gem](https://img.shields.io/gem/v/jekyll-diagrams.svg?label=Gem&style=flat-square)](https://rubygems.org/gems/jekyll-diagrams)
|
4
4
|
[![Test](https://img.shields.io/github/workflow/status/zhustec/jekyll-diagrams/Test?label=Test&style=flat-square)](https://github.com/zhustec/jekyll-diagrams/actions?query=workflow%3ATest)
|
5
|
-
[![
|
5
|
+
[![Feature](https://img.shields.io/travis/com/zhustec/jekyll-diagrams.svg?label=Feature&style=flat-square)](https://travis-ci.com/zhustec/jekyll-diagrams)
|
6
6
|
[![Linter](https://img.shields.io/github/workflow/status/zhustec/jekyll-diagrams/Linter?label=Linter&style=flat-square)](https://github.com/zhustec/jekyll-diagrams/actions?query=workflow%3ALinter)
|
7
7
|
[![Coverage](https://img.shields.io/coveralls/github/zhustec/jekyll-diagrams?label=Coverage&style=flat-square)](https://coveralls.io/github/zhustec/jekyll-diagrams)
|
8
8
|
[![License](https://img.shields.io/github/license/zhustec/jekyll-diagrams.svg?label=License&style=flat-square)](https://github.com/zhustec/jekyll-diagrams/blob/master/LICENSE)
|
9
9
|
|
10
|
-
Jekyll Diagrams is a jekyll plugins for creating diagrams,
|
10
|
+
Jekyll Diagrams is a jekyll plugins for creating diagrams, it is inspired by [asciidoctor-diagram](https://github.com/asciidoctor/asciidoctor-diagram). Currently support:
|
11
|
+
|
12
|
+
- [**Blockdiag**](http://blockdiag.com/en/)
|
13
|
+
- [**Erd**](https://github.com/BurntSushi/erd)
|
14
|
+
- [**GraphViz**](http://graphviz.org/)
|
15
|
+
- [**Mermaid**](https://mermaid-js.github.io/mermaid/)
|
16
|
+
- [**Nomnoml**](http://nomnoml.com/)
|
17
|
+
- [**PlantUML**](https://plantuml.com/)
|
18
|
+
- [**Svgbob**](https://ivanceras.github.io/svgbob-editor/)
|
19
|
+
- [**Syntrax**](https://kevinpt.github.io/syntrax/)
|
20
|
+
- [**Vega**](https://vega.github.io/vega/)
|
21
|
+
- [**Vega-Lite**](https://vega.github.io/vega-lite/)
|
22
|
+
- [**WaveDrom**](https://wavedrom.com/).
|
23
|
+
|
24
|
+
**WARNING:** Since it is just 0.x.x currently, internal implementation maybe **CHANGED FREQUENTLY**. So don't rely on the internal implementation unless you know what you are doing.
|
11
25
|
|
12
26
|
**NOTICE:** This plugin render **SVG** format image and directly **embed into html file**, so you don't need to worry about where to store the image. But, please feel free to tell me if you **unlikely** want other image format.
|
13
27
|
|
@@ -15,19 +29,9 @@ Jekyll Diagrams is a jekyll plugins for creating diagrams, currently support for
|
|
15
29
|
- [Configurations](#configurations)
|
16
30
|
- [Error Mode](#error-mode)
|
17
31
|
- [Usage](#usage)
|
18
|
-
- [Blockdiag](#blockdiag)
|
19
|
-
- [Erd](#erd)
|
20
|
-
- [Graphviz](#graphviz)
|
21
|
-
- [Mermaid](#mermaid)
|
22
|
-
- [Nomnoml](#nomnoml)
|
23
|
-
- [PlantUML](#plantuml)
|
24
|
-
- [State Machine Cat](#state-machine-cat)
|
25
|
-
- [Svgbob](#svgbob)
|
26
|
-
- [Syntrax](#syntrax)
|
27
|
-
- [Vega](#vega)
|
28
|
-
- [Wavedrom](#wavedrom)
|
29
32
|
- [Contributing](#contributing)
|
30
33
|
- [License](#license)
|
34
|
+
- [Code of Conduct](#code-of-conduct)
|
31
35
|
|
32
36
|
## Installation
|
33
37
|
|
@@ -49,7 +53,7 @@ end
|
|
49
53
|
Finally run:
|
50
54
|
|
51
55
|
```bash
|
52
|
-
|
56
|
+
bundle install
|
53
57
|
```
|
54
58
|
|
55
59
|
## Configurations
|
@@ -103,407 +107,18 @@ jekyll-diagrams:
|
|
103
107
|
error_mode: 'mode'
|
104
108
|
```
|
105
109
|
|
106
|
-
##
|
107
|
-
|
108
|
-
### Blockdiag
|
109
|
-
|
110
|
-
#### Prerequisites
|
111
|
-
|
112
|
-
Install it.
|
113
|
-
|
114
|
-
```bash
|
115
|
-
$ pip3 install blockdiag seqdiag actiag nwdiag
|
116
|
-
```
|
117
|
-
|
118
|
-
Then you can use following tags:
|
119
|
-
|
120
|
-
* `blockdiag`
|
121
|
-
* `seqdiag`
|
122
|
-
* `actdiag`
|
123
|
-
* `nwdiag`
|
124
|
-
* `rackdiag`
|
125
|
-
* `packetdiag`
|
126
|
-
|
127
|
-
#### Examples
|
128
|
-
|
129
|
-
```text
|
130
|
-
{% blockdiag %}
|
131
|
-
blockdiag {
|
132
|
-
A -> B -> C -> D;
|
133
|
-
A -> E -> F -> G;
|
134
|
-
}
|
135
|
-
{% endblockdiag %}
|
136
|
-
```
|
137
|
-
|
138
|
-
And `seqdiag`:
|
139
|
-
|
140
|
-
```text
|
141
|
-
{% seqdiag %}
|
142
|
-
seqdiag {
|
143
|
-
browser -> webserver [label = "GET /index.html"];
|
144
|
-
browser <-- webserver;
|
145
|
-
browser -> webserver [label = "POST /blog/comment"];
|
146
|
-
webserver -> database [label = "INSERT comment"];
|
147
|
-
webserver <-- database;
|
148
|
-
browser <-- webserver;
|
149
|
-
}
|
150
|
-
{% endseqdiag %}
|
151
|
-
```
|
152
|
-
|
153
|
-
#### Configurations
|
154
|
-
|
155
|
-
| Config | Default | Description |
|
156
|
-
| ----------- | ----------- | --------------------------------------- |
|
157
|
-
| `antialias` | unspecified | Pass diagram image to anti-alias filter |
|
158
|
-
| `font` | unspecified | use FONT to draw diagram |
|
159
|
-
| `fontmap` | unspecified | use FONTMAP file to draw diagram |
|
160
|
-
| `size` | unspecified | Size of diagram (ex. 320x240) |
|
161
|
-
|
162
|
-
### Erd
|
163
|
-
|
164
|
-
#### Prerequisites
|
165
|
-
|
166
|
-
- Install Graphviz
|
167
|
-
- Install Erd
|
168
|
-
|
169
|
-
```bash
|
170
|
-
$ sudo apt install graphviz cabal-install
|
171
|
-
$ cabal update && cabal install erd
|
172
|
-
```
|
173
|
-
|
174
|
-
#### Examples
|
175
|
-
|
176
|
-
```text
|
177
|
-
{% erd %}
|
178
|
-
[Person]
|
179
|
-
*name
|
180
|
-
height
|
181
|
-
weight
|
182
|
-
`birth date`
|
183
|
-
+birth_place_id
|
184
|
-
|
185
|
-
[`Birth Place`]
|
186
|
-
*id
|
187
|
-
`birth city`
|
188
|
-
'birth state'
|
189
|
-
"birth country"
|
190
|
-
|
191
|
-
Person *--1 `Birth Place`
|
192
|
-
{% enderd %}
|
193
|
-
```
|
194
|
-
|
195
|
-
#### Configurations
|
196
|
-
|
197
|
-
| Config | Default | Description |
|
198
|
-
| ------------ | ----------- | -------------------------------------------------------------------------- |
|
199
|
-
| `config` | unspecified | Configuration file |
|
200
|
-
| `edge` | unspecified | Select one type of edge: compound, noedge, ortho, poly, spline |
|
201
|
-
| `dot-entity` | unspecified | When set, output will consist of regular dot tables instead of HTML tables |
|
202
|
-
|
203
|
-
### Graphviz
|
204
|
-
|
205
|
-
#### Prerequisites
|
206
|
-
|
207
|
-
Install it.
|
208
|
-
|
209
|
-
#### Examples
|
210
|
-
|
211
|
-
```text
|
212
|
-
{% graphviz %}
|
213
|
-
digraph {
|
214
|
-
node [shape=circle, style=filled];
|
215
|
-
S [fillcolor=green];
|
216
|
-
A [fillcolor=yellow];
|
217
|
-
B [fillcolor=yellow];
|
218
|
-
C [fillcolor=yellow];
|
219
|
-
D [shape=doublecircle, fillcolor=green];
|
220
|
-
S -> A [label=a];
|
221
|
-
S -> B [label=b];
|
222
|
-
A -> D [label=c];
|
223
|
-
B -> D [label=d];
|
224
|
-
}
|
225
|
-
{% endgraphviz %}
|
226
|
-
```
|
227
|
-
|
228
|
-
#### Configurations
|
229
|
-
|
230
|
-
| Config | Default | Description |
|
231
|
-
| ------------------ | ----------- | ---------------------------- |
|
232
|
-
| `default_layout` | dot | Set layout engine |
|
233
|
-
| `graph_attributes` | unspecified | Set default graph attributes |
|
234
|
-
| `node_attributes` | unspecified | Set default node attributes |
|
235
|
-
| `edge_attributes` | unspecified | Set default edge attributes |
|
236
|
-
| `encoding` | utf-8 | Set default SVG encoding |
|
237
|
-
|
238
|
-
**NOTICE:** attributes can be `String`(when just one attribute), `Array` or `Hash`.
|
239
|
-
|
240
|
-
### Mermaid
|
241
|
-
|
242
|
-
#### Prerequisites
|
243
|
-
|
244
|
-
Install `mermaid.cli`.
|
245
|
-
|
246
|
-
```bash
|
247
|
-
$ npm install -g mermaid.cli
|
248
|
-
```
|
249
|
-
|
250
|
-
**Notice:** You may need to install some missing libraries, follow the output of `mmdc`.
|
251
|
-
|
252
|
-
#### Examples
|
253
|
-
|
254
|
-
```text
|
255
|
-
{% mermaid %}
|
256
|
-
sequenceDiagram
|
257
|
-
participant John
|
258
|
-
participant Alice
|
259
|
-
Alice->>John: Hello John, how are you?
|
260
|
-
John-->>Alice: Great!
|
261
|
-
{% endmermaid %}
|
262
|
-
```
|
263
|
-
|
264
|
-
#### Configurations
|
265
|
-
|
266
|
-
| Config | Default | Description |
|
267
|
-
| ----------------- | ------- | ------------------------------------------------------------- |
|
268
|
-
| `width` | 800 | Width of the page |
|
269
|
-
| `height` | 600 | Height of the page |
|
270
|
-
| `backgroundColor` | white | Background color. Example: transparent, red, '#F0F0F0' |
|
271
|
-
| `theme` | default | Theme of the chart, could be default, forest, dark or neutral |
|
272
|
-
|
273
|
-
### Nomnoml
|
274
|
-
|
275
|
-
#### Prerequisites
|
276
|
-
|
277
|
-
Install it.
|
278
|
-
|
279
|
-
```bash
|
280
|
-
$ npm install -g nomnoml
|
281
|
-
```
|
282
|
-
#### Examples
|
283
|
-
|
284
|
-
```text
|
285
|
-
{% nomnoml %}
|
286
|
-
[Pirate|eyeCount: Int|raid();pillage()|
|
287
|
-
[beard]--[parrot]
|
288
|
-
[beard]-:>[foul mouth]
|
289
|
-
]
|
290
|
-
|
291
|
-
[<abstract>Marauder]<:--[Pirate]
|
292
|
-
[Pirate]- 0..7[mischief]
|
293
|
-
[jollyness]->[Pirate]
|
294
|
-
[jollyness]->[rum]
|
295
|
-
[jollyness]->[singing]
|
296
|
-
[Pirate]-> *[rum|tastiness: Int|swig()]
|
297
|
-
[Pirate]->[singing]
|
298
|
-
[singing]<->[rum]
|
299
|
-
|
300
|
-
[<start>st]->[<state>plunder]
|
301
|
-
[plunder]->[<choice>more loot]
|
302
|
-
[more loot]->[st]
|
303
|
-
[more loot] no ->[<end>e]
|
304
|
-
|
305
|
-
[<actor>Sailor] - [<usecase>shiver me;timbers]
|
306
|
-
{% endnomnoml %}
|
307
|
-
```
|
308
|
-
|
309
|
-
### PlantUML
|
310
|
-
|
311
|
-
#### Prerequisites
|
312
|
-
|
313
|
-
Install java runtime.
|
314
|
-
|
315
|
-
```bash
|
316
|
-
$ sudo apt install default-jre
|
317
|
-
```
|
318
|
-
|
319
|
-
#### Examples
|
320
|
-
|
321
|
-
```text
|
322
|
-
{% plantuml %}
|
323
|
-
@startuml
|
324
|
-
class Car
|
325
|
-
|
326
|
-
Driver - Car : drives >
|
327
|
-
Car *- Wheel : have 4 >
|
328
|
-
Car -- Person : < owns
|
329
|
-
|
330
|
-
@enduml
|
331
|
-
{% endplantuml %}
|
332
|
-
```
|
333
|
-
|
334
|
-
### State Machine Cat
|
335
|
-
|
336
|
-
#### Prerequisites
|
337
|
-
|
338
|
-
Install it.
|
339
|
-
|
340
|
-
```bash
|
341
|
-
$ npm install -g state-machine-cat
|
342
|
-
```
|
343
|
-
|
344
|
-
#### Examples
|
345
|
-
|
346
|
-
```text
|
347
|
-
{% smcat %}
|
348
|
-
initial,
|
349
|
-
"tape player off",
|
350
|
-
"tape player on" {
|
351
|
-
stopped => playing : play;
|
352
|
-
playing => stopped : stop;
|
353
|
-
playing => paused : pause;
|
354
|
-
paused => playing : pause;
|
355
|
-
paused => stopped : stop;
|
356
|
-
};
|
357
|
-
|
358
|
-
initial => "tape player off";
|
359
|
-
"tape player off" => stopped : power;
|
360
|
-
"tape player on" => "tape player off" : power;
|
361
|
-
{% endsmcat %}
|
362
|
-
```
|
363
|
-
|
364
|
-
#### Configuration
|
365
|
-
|
366
|
-
| Config | Default | Description |
|
367
|
-
| ------------ | ---------- | ----------------------------------------------------------------------------------- |
|
368
|
-
| `input-type` | `smcat` | Input type. `smcat scxml json` |
|
369
|
-
| `engine` | `dot` | Layout engine to use. `dot circo fdp neato osage twopi` |
|
370
|
-
| `direction` | `top-down` | Direction of the state machine diagram. `top-down bottom-top left-right right-left` |
|
371
|
-
|
372
|
-
### Svgbob
|
373
|
-
|
374
|
-
#### Prerequisites
|
375
|
-
|
376
|
-
Install `svgbob_cli`.
|
377
|
-
|
378
|
-
```bash
|
379
|
-
$ sudo apt install cargo
|
380
|
-
$ cargo install svgbob_cli
|
381
|
-
```
|
382
|
-
|
383
|
-
#### Examples
|
384
|
-
|
385
|
-
```text
|
386
|
-
{% svgbob %}
|
387
|
-
.---> F
|
388
|
-
A B C D /
|
389
|
-
*-------*-----*---*----*-----> E
|
390
|
-
\ ^ \
|
391
|
-
v / '---> G
|
392
|
-
B --> C -'
|
393
|
-
{% endsvgbob %}
|
394
|
-
```
|
395
|
-
|
396
|
-
#### Configuration
|
397
|
-
|
398
|
-
| Config | Default | Description |
|
399
|
-
| -------------- | ------- | ---------------------------------------------------------- |
|
400
|
-
| `font-family` | arial | Font |
|
401
|
-
| `font-size` | 12 | Font size |
|
402
|
-
| `scale` | 1 | Scale the entire svg (dimensions, font size, stroke width) |
|
403
|
-
| `stroke-width` | 2 | stroke width for all lines |
|
404
|
-
|
405
|
-
### Syntrax
|
406
|
-
|
407
|
-
#### Prerequisites
|
408
|
-
|
409
|
-
- Install Pango, Cairo and PangoCairo support
|
410
|
-
- Install `syntrax`
|
411
|
-
|
412
|
-
```bash
|
413
|
-
$ sudo apt install libpango1.0-dev python3-cairo python3-gi python3-gi-cairo
|
414
|
-
$ pip3 install syntrax
|
415
|
-
```
|
416
|
-
|
417
|
-
#### Examples
|
418
|
-
|
419
|
-
```text
|
420
|
-
{% syntrax %}
|
421
|
-
indentstack(10,
|
422
|
-
line(opt('-'), choice('0', line('1-9', loop(None, '0-9'))),
|
423
|
-
opt('.', loop('0-9', None))),
|
424
|
-
|
425
|
-
line(opt(choice('e', 'E'), choice(None, '+', '-'), loop('0-9', None)))
|
426
|
-
)
|
427
|
-
{% endsyntrax %}
|
428
|
-
```
|
429
|
-
|
430
|
-
#### Configurations
|
431
|
-
|
432
|
-
| Config | Default | Description |
|
433
|
-
| ------------- | ----------- | ---------------------- |
|
434
|
-
| `scale` | 1 | Scale image |
|
435
|
-
| `style` | unspecified | Style config file |
|
436
|
-
| `transparent` | false | Transparent background |
|
437
|
-
|
438
|
-
### Vega
|
439
|
-
|
440
|
-
#### Prerequisites
|
441
|
-
|
442
|
-
Install `vega-cli` and `vega-lite`.
|
443
|
-
|
444
|
-
```bash
|
445
|
-
$ npm install -g vega-cli vega-lite
|
446
|
-
```
|
447
|
-
|
448
|
-
The you can use `vega` and `vegalite` tag.
|
449
|
-
|
450
|
-
|
451
|
-
#### Examples
|
452
|
-
|
453
|
-
```text
|
454
|
-
{% vegalite %}
|
455
|
-
{
|
456
|
-
"": "https://vega.github.io/schema/vega-lite/v4.json",
|
457
|
-
"description": "A simple bar chart with embedded data.",
|
458
|
-
"data": {
|
459
|
-
"values": [
|
460
|
-
{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
|
461
|
-
{"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
|
462
|
-
{"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
|
463
|
-
]
|
464
|
-
},
|
465
|
-
"mark": "bar",
|
466
|
-
"encoding": {
|
467
|
-
"x": {"field": "a", "type": "ordinal"},
|
468
|
-
"y": {"field": "b", "type": "quantitative"}
|
469
|
-
}
|
470
|
-
}
|
471
|
-
{% endvegalite %}
|
472
|
-
```
|
473
|
-
|
474
|
-
#### Configurations
|
475
|
-
|
476
|
-
| Config | Default | Description |
|
477
|
-
| ------- | ------- | ------------------- |
|
478
|
-
| `scale` | 1 | Scale image[Number] |
|
479
|
-
|
480
|
-
### Wavedrom
|
481
|
-
|
482
|
-
#### Prerequisites
|
483
|
-
|
484
|
-
Install `wavedrom-cli`.
|
485
|
-
|
486
|
-
```bash
|
487
|
-
$ npm install -g wavedrom-cli
|
488
|
-
```
|
489
|
-
|
490
|
-
#### Examples
|
110
|
+
## Configurations
|
491
111
|
|
492
|
-
|
493
|
-
{% wavedrom %}
|
494
|
-
{signal: [
|
495
|
-
{name: 'clk', wave: 'p.....|...'},
|
496
|
-
{name: 'dat', wave: 'x.345x|=.x', data: ['head', 'body', 'tail', 'data']},
|
497
|
-
{name: 'req', wave: '0.1..0|1.0'},
|
498
|
-
{name: 'ack', wave: '1.....|01.'}
|
499
|
-
]}
|
500
|
-
{% endwavedrom %}
|
501
|
-
```
|
112
|
+
Form more configurations please refer to [Liquid Diagrams](https://github.com/zhustec/liquid-diagrams)
|
502
113
|
|
503
114
|
## Contributing
|
504
115
|
|
505
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/zhustec/jekyll-diagrams
|
116
|
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/zhustec/jekyll-diagrams.> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/zhustec/jekyll-diagrams/blob/master/CODE_OF_CONDUCT.md).
|
506
117
|
|
507
118
|
## License
|
508
119
|
|
509
|
-
The gem is available as open source under the terms of the [MIT License](
|
120
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
121
|
+
|
122
|
+
## Code of Conduct
|
123
|
+
|
124
|
+
Everyone interacting in the `jekyll-diagrams` project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
|