jekyll-diagrams 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3f1fe990807c62c25fe99620086be43c6ee2686466a343ca5ae3c46bc22a62b
4
- data.tar.gz: be24cab35d4b8afdd58956532d200b9010d3e4ef33a1961e532b9d1a857eac41
3
+ metadata.gz: ba2145fe38bb652b970e45b0b4e311d9c56c8950078b0e127bf8d907a5f96061
4
+ data.tar.gz: 8f020319e7e68c1f47114d1f990efff6a50bda4c7bac076a617c3284ccf38951
5
5
  SHA512:
6
- metadata.gz: 2852b19ce85eef87ae1e362d63047aadf101f3867c8027650c49c3f9118533ba4615a36b1f748ea16cf373ab774729f04c8870c6a15d2f2268b447e926209901
7
- data.tar.gz: 448d85033efb665594918b9ef20a0827de05407757afc3440311f43e45f4d184cae890f8bfc63fd900c3ee4e092e3ceb9557c42aac01263bdbc867bd1d659154
6
+ metadata.gz: 521daa00f341db66db49086c50febc4c092b0f126a7777104b00d6c1072d1ee5ca6786a1bb32f19a5fa2ccad4b693c8e58986a3798e05cb3e61b4ada710e5dc1
7
+ data.tar.gz: fd97bc95da594fd38864c05ebf317d4b585a2173e4b76da836e84bc817ce00dc0ecc84dd8b2a26b668f65a533d077b078777938785b862252bfe66025281f7f9
@@ -78,13 +78,4 @@ jobs:
78
78
  before_install:
79
79
  - pip3 install blockdiag seqdiag actdiag nwdiag syntrax
80
80
 
81
- script: bundle exec rake 'dummy_site:build[$DIAGRAM]'
82
-
83
- deploy:
84
- provider: rubygems
85
- api_key:
86
- secure: b8mpSmo1IqW0DWhqwbZtrNWS/XIUGdLvtFuvBptdA979lpb9aDFfWaFgHnZ6IahP2djRT1yRx6fg/6cp2ZShC/FdpekeASEUn4KGz+1kNh/rfSYPQV5Cs7nkw9i2/WWmze4al5cS7IhnOr2vYXlGTZZeC6Lb+3eQHtVJYQpG3bGwg9ozyekYC2VWQdzFVAvLsjAGMEi2S5GQobbmfN5FvUZb4dnnl3crI+q0NoDkafpzZBcH8ITTZyttZDU26JIptXM5qRGZGGYSREzCc3frLpoIbAB1Vbz/A4+RF8wecsmBMOPNCPWWMvjtgkII5fHmDF/cXAnbktVzG3ECNIGmv7UPA64Mjgl9WZKZH1rujDievVz9aRryA8jIIBbbfqNZeQ+SwP3401vPLSW7yWWJdkPrFMe9+OpV47azmdTVG0PmIdPhkSOI4s3sR0BAFp6TPgaLEH1zrm3sPfLkkVD5XGfQTlI7KIS4e68qGHC2mO5LGXby8SMMp+5/+A5Pzo0dbtXtOJxNwI+iZEhNJh49Qgwc/Cd0cRbFXGWOBMNDozW95LlrDWw9rdwWE4HjuEWfwRbQGydymp+CskkKne7bz4F27UbHI0ougdekI+TaY5w6UL12rZhwbutxASLH0d+dT2OR+rC7prbJRjcwpxEFt/DwiGsVepgB8Uwge8CPSYI=
87
- gem: jekyll-diagrams
88
- on:
89
- tags: true
90
- repo: zhustec/jekyll-diagrams
81
+ script: bundle exec rake 'dummy_site:build[$DIAGRAM]'
data/Dockerfile CHANGED
@@ -10,16 +10,12 @@ RUN set -eux; \
10
10
  RUN set -eux; \
11
11
  gem update -N --system; \
12
12
  gem install -N bundler; \
13
- npm install -g --silent mermaid.cli nomnoml state-machine-cat wavedrom-cli; \
13
+ npm install -g --silent mermaid.cli nomnoml state-machine-cat; \
14
+ npm install -g vega-cli vega-lite wavedrom-cli; \
14
15
  pip3 install blockdiag seqdiag actdiag nwdiag syntrax
15
16
 
16
17
  WORKDIR /opt/jekyll-diagrams
17
18
 
18
19
  COPY . .
19
20
 
20
- # RUN set -eux; \
21
- # apt-get install -y --no-install-recommends cabal-install; \
22
- # cabal update; \
23
- # cabal install erd
24
-
25
- # RUN bundle install
21
+ RUN bundle install
data/README.md CHANGED
@@ -5,7 +5,9 @@
5
5
  [![Depfu](https://img.shields.io/depfu/zhustec/jekyll-diagrams.svg?style=flat-square)](https://depfu.com/repos/zhustec/jekyll-diagrams)
6
6
  [![license](https://img.shields.io/github/license/zhustec/jekyll-diagrams.svg?style=flat-square)](https://github.com/zhustec/jekyll-diagrams/blob/master/LICENSE)
7
7
 
8
- Jekyll Diagrams is a jekyll plugins for creating amazing diagrams, including:
8
+ Jekyll Diagrams is a jekyll plugins for creating diagrams, currently support for [**Blockdiag**](http://blockdiag.com/en/), [**Erd**](https://github.com/BurntSushi/erd), [**GraphViz**](http://graphviz.org/), [**Mermaid**](https://mermaid-js.github.io/mermaid/), [**Nomnoml**](http://nomnoml.com/), [**PlantUML**](https://plantuml.com/), [**Svgbob**](https://ivanceras.github.io/svgbob-editor/), [**Syntrax**](https://kevinpt.github.io/syntrax/), [**Vega**](https://vega.github.io/vega/), [**Vega-Lite**](https://vega.github.io/vega-lite/) and [**WaveDrom**](https://wavedrom.com/). More diagrams support will be added in future versions.
9
+
10
+ **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.
9
11
 
10
12
  - [Installation](#installation)
11
13
  - [Configuration](#configuration)
@@ -49,7 +51,7 @@ $ bundle install
49
51
 
50
52
  ## Configuration
51
53
 
52
- All configurations are at `_config.yml` file under `jekyll-diagrams`, e.g:
54
+ All configurations are under `jekyll-diagrams`, e.g:
53
55
 
54
56
  ```yaml
55
57
  jekyll-diagrams:
@@ -57,6 +59,8 @@ jekyll-diagrams:
57
59
  # configurations for graphviz
58
60
  blockdiag:
59
61
  # configurations for blockdiag
62
+ syntrax:
63
+ # configurations for syntrax
60
64
  # and so on
61
65
  ```
62
66
 
@@ -64,24 +68,23 @@ jekyll-diagrams:
64
68
 
65
69
  ### Blockdiag
66
70
 
67
- Blockdiag contains:
68
-
69
- * `blockdiag` : generates block diagram image
70
- * `seqdiag` : generates sequence diagram image
71
- * `actdiag` : generates activity diagram image
72
- * `nwdiag` : generates network diagram image
73
- * `rackdiag` : generates rack structure diagram
74
- * `packetdiag` : generates packet header diagram
75
-
76
71
  #### Prerequisites
77
72
 
78
- - Install it via pip or other methods
79
- - Set path properly, make sure your system can find it
73
+ Install it.
80
74
 
81
75
  ```bash
82
- $ pip install blockdiag seqdiag actiag nwdiag
76
+ $ pip3 install blockdiag seqdiag actiag nwdiag
83
77
  ```
84
78
 
79
+ Then you can use following tags:
80
+
81
+ * `blockdiag`
82
+ * `seqdiag`
83
+ * `actdiag`
84
+ * `nwdiag`
85
+ * `rackdiag`
86
+ * `packetdiag`
87
+
85
88
  #### Examples
86
89
 
87
90
  ```text
@@ -110,23 +113,24 @@ seqdiag {
110
113
 
111
114
  #### Configurations
112
115
 
113
- ```yaml
114
- jekyll-diagrams:
115
- blockdiag:
116
- antialias: true
117
- config: configuration_file
118
- font: your_custom_font
119
- fontmap: your_custom_font
120
- size: 320x400
121
- ```
116
+ | Config | Default | Description |
117
+ | ----------- | ----------- | --------------------------------------- |
118
+ | `antialias` | unspecified | Pass diagram image to anti-alias filter |
119
+ | `font` | unspecified | use FONT to draw diagram |
120
+ | `fontmap` | unspecified | use FONTMAP file to draw diagram |
121
+ | `size` | unspecified | Size of diagram (ex. 320x240) |
122
122
 
123
123
  ### Erd
124
124
 
125
125
  #### Prerequisites
126
126
 
127
127
  - Install Graphviz
128
- - [**Install Erd**](https://github.com/BurntSushi/erd#installation)
129
- - Set path properly, make sure your system can find it
128
+ - Install Erd
129
+
130
+ ```bash
131
+ $ sudo apt install graphviz cabal-install
132
+ $ cabal update && cabal install erd
133
+ ```
130
134
 
131
135
  #### Examples
132
136
 
@@ -151,18 +155,17 @@ Person *--1 `Birth Place`
151
155
 
152
156
  #### Configurations
153
157
 
154
- ```yaml
155
- jekyll-diagrams:
156
- erd:
157
- config: path_to_config_file
158
- edge: 'one type of edge: compound, noedge, ortho, poly, spline'
159
- ```
158
+ | Config | Default | Description |
159
+ | ------------ | ----------- | ------------------------------------------------------------------------------------------------------- |
160
+ | `config` | unspecified | Configuration file |
161
+ | `edge` | unspecified | Select one type of edge: compound, noedge, ortho, poly, spline |
162
+ | `dot-entity` | unspecified | When set, output will consist of regular dot tables instead of HTML tables. Formatting will be disabled |
160
163
 
161
164
  ### Graphviz
162
165
 
163
166
  #### Prerequisites
164
167
 
165
- - Install it.
168
+ Install it.
166
169
 
167
170
  #### Examples
168
171
 
@@ -185,47 +188,43 @@ digraph {
185
188
 
186
189
  #### Configurations
187
190
 
188
- ```yaml
189
- jekyll-diagrams:
190
- graphviz:
191
- default_layout: dot
192
- graph_attribute: color=red
193
- node_attribute:
194
- - color=blue
195
- - fillcolor=red
196
- edge_attribute:
197
- color: red
198
- fillcolor: blue
199
- ```
191
+ | Config | Default | Description |
192
+ | ------------------ | ----------- | --------------------------- |
193
+ | `default_layout` | dot | Set default layout engine |
194
+ | `graph_attributes` | unspecified | Set default graph attribute |
195
+ | `node_attributes` | unspecified | Set default node attribute |
196
+ | `edge_attributes` | unspecified | Set default edge attribute |
200
197
 
201
- - `default_layout`: Change the default layout here.
202
- - `graph/node/edge_attribute`: Default graph/node/edge attribute, can be String(when just one attribute), Array or Hash.
198
+ **NOTICE:** attributes can be `String`(when just one attribute), `Array` or `Hash`.
203
199
 
204
200
  ### Mermaid
205
201
 
206
202
  #### Prerequisites
207
203
 
208
- - [**Install mermaid.cli**](https://github.com/mermaidjs/mermaid.cli#mermaidcli)
209
- - Set path properly, make sure your system can find it
204
+ Install `mermaid.cli`.
210
205
 
211
- #### Configurations
212
-
213
- ```yaml
214
- jekyll-diagrams:
215
- mermaid:
216
- theme: default,
217
- width: 800,
218
- height: 600,
219
- backgroundColor: white
206
+ ```bash
207
+ $ npm install -g mermaid.cli
220
208
  ```
221
209
 
222
- - `theme`: Theme of the chart, could be default, forest, dark or neutral. (default: default)
223
- - `width`: Width of the page. (default: 800)
224
- - `height`: Height of the page. (default: 600)
225
- - `backgroundColor`: Background color. Example: transparent, red, '#F0F0F0'. (default: white)
210
+ #### Configurations
211
+
212
+ | Config | Default | Description |
213
+ | ----------------- | ------- | ------------------------------------------------------------- |
214
+ | `theme` | default | Theme of the chart, could be default, forest, dark or neutral |
215
+ | `width` | 800 | Width of the page |
216
+ | `height` | 600 | Height of the page |
217
+ | `backgroundColor` | white | Background color. Example: transparent, red, '#F0F0F0' |
226
218
 
227
219
  ### Nomnoml
228
220
 
221
+ #### Prerequisites
222
+
223
+ Install it.
224
+
225
+ ```bash
226
+ $ npm install -g nomnoml
227
+ ```
229
228
  #### Examples
230
229
 
231
230
  ```text
@@ -257,7 +256,11 @@ jekyll-diagrams:
257
256
 
258
257
  #### Prerequisites
259
258
 
260
- - Java Runtime
259
+ Install java runtime.
260
+
261
+ ```bash
262
+ $ sudo apt install default-jre
263
+ ```
261
264
 
262
265
  #### Examples
263
266
 
@@ -278,9 +281,11 @@ Car -- Person : < owns
278
281
 
279
282
  #### Prerequisites
280
283
 
281
- - Nodejs Runtime
282
- - Install it `npm install [-g] state-machine-cat`
283
- - Set path properly, make sure your system can find it
284
+ Install it.
285
+
286
+ ```bash
287
+ $ npm install -g state-machine-cat
288
+ ```
284
289
 
285
290
  #### Examples
286
291
 
@@ -304,26 +309,44 @@ initial => "tape player off";
304
309
 
305
310
  #### Configuration
306
311
 
307
- ```yaml
308
- jekyll-diagrams:
309
- smcat:
310
- input-type: smcat
311
- engine: dot
312
- direction: top-down
312
+ | Config | Default | Description |
313
+ | ------------ | ---------- | ----------------------------------------------------------------------------------- |
314
+ | `input-type` | `smcat` | Input type. `smcat|scxml|json` |
315
+ | `engine` | `dot` | Layout engine to use. `dot|circo|fdp|neato|osage|twopi` |
316
+ | `direction` | `top-down` | Direction of the state machine diagram. `top-down|bottom-top|left-right|right-left` |
317
+
318
+ ### Svgbob
319
+
320
+ #### Prerequisites
321
+
322
+ - Install `cargo`
323
+ - Install `svgbob_cli`
324
+
325
+ ```bash
326
+ $ sudo apt install cargo
327
+ $ cargo install svgbob_cli
313
328
  ```
314
329
 
315
- - `input-type`: `smcat|scxml|json` (Default: `smcat`)
316
- - `engine`: `dot|circo|fdp|neato|osage|twopi` (Default: `dot`)
317
- - `direction`: `top-down|bottom-top|left-right|right-left` (Default: `top-down`)
330
+ #### Configuration
318
331
 
319
- ### Svgbob
332
+ | Config | Default | Description |
333
+ | -------------- | ------- | ---------------------------------------------------------- |
334
+ | `font-family` | arial | Font |
335
+ | `font-size` | 12 | Font size |
336
+ | `scale` | 1 | Scale the entire svg (dimensions, font size, stroke width) |
337
+ | `stroke-width` | 2 | stroke width for all lines |
320
338
 
321
339
  ### Syntrax
322
340
 
323
341
  #### Prerequisites
324
342
 
325
- - [Install Syntrax, Pango and PangoCairo](https://kevinpt.github.io/syntrax/#requirements)
326
- - Set path properly, make sure your system can find it
343
+ - Install Pango, Cairo and PangoCairo
344
+ - Install `syntrax`
345
+
346
+ ```bash
347
+ $ sudo apt install libpango1.0-dev python3-cairo python3-gi
348
+ $ pip3 install syntrax
349
+ ```
327
350
 
328
351
  #### Examples
329
352
 
@@ -340,18 +363,53 @@ indentstack(10,
340
363
 
341
364
  #### Configurations
342
365
 
343
- ```yaml
344
- jekyll-diagrams:
345
- syntrax:
346
- scale: 'Scale image'
347
- style: 'Style config file'
348
- transparent: 'Transparent background'
349
- ```
366
+ | Config | Default | Description |
367
+ | ------------- | ----------- | ---------------------- |
368
+ | `scale` | 1 | Scale image |
369
+ | `style` | unspecified | Style config file |
370
+ | `transparent` | false | Transparent background |
350
371
 
351
372
  ### Vega
352
373
 
374
+ #### Prerequisites
375
+
376
+ Install `vega-cli` and `vega-lite`.
377
+
378
+ ```bash
379
+ $ npm install -g vega-cli vega-lite
380
+ ```
381
+
382
+ The you can use `vega` and `vegalite` tag.
383
+
384
+ #### Configurations
385
+
386
+ | Config | Default | Description |
387
+ | ------- | ------- | ------------------- |
388
+ | `scale` | 1 | Scale image[Number] |
389
+
353
390
  ### Wavedrom
354
391
 
392
+ #### Prerequisites
393
+
394
+ Install `wavedrom-cli`.
395
+
396
+ ```bash
397
+ $ npm install -g wavedrom-cli
398
+ ```
399
+
400
+ #### Examples
401
+
402
+ ```text
403
+ {% wavedrom %}
404
+ {signal: [
405
+ {name: 'clk', wave: 'p.....|...'},
406
+ {name: 'dat', wave: 'x.345x|=.x', data: ['head', 'body', 'tail', 'data']},
407
+ {name: 'req', wave: '0.1..0|1.0'},
408
+ {name: 'ack', wave: '1.....|01.'}
409
+ ]}
410
+ {% endwavedrom %}
411
+ ```
412
+
355
413
  ## Contributing
356
414
 
357
415
  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 [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -3,9 +3,9 @@ module Jekyll
3
3
  class GraphvizBlock < Block
4
4
  CONFIGRATIONS = {
5
5
  'K' => 'default_layout',
6
- 'G' => 'graph_attribute',
7
- 'N' => 'node_attribute',
8
- 'E' => 'edge_attribute'
6
+ 'G' => 'graph_attributes',
7
+ 'N' => 'node_attributes',
8
+ 'E' => 'edge_attributes'
9
9
  }.freeze
10
10
 
11
11
  def render_svg(code, config)
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Diagrams
3
- VERSION = '0.8.0'
3
+ VERSION = '0.9.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-diagrams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhustec
@@ -139,7 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubygems_version: 3.0.6
142
+ rubyforge_project:
143
+ rubygems_version: 2.7.6.2
143
144
  signing_key:
144
145
  specification_version: 4
145
146
  summary: Jekyll plugins for diagrams support, including Graphviz, Blockdiag, PlantUML