jekyll-diagrams 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba2145fe38bb652b970e45b0b4e311d9c56c8950078b0e127bf8d907a5f96061
4
- data.tar.gz: 8f020319e7e68c1f47114d1f990efff6a50bda4c7bac076a617c3284ccf38951
3
+ metadata.gz: 192585b3f75f6ad3cfe6403e79f7ab565ea1ea2589b8b5003baf03ec08883ae7
4
+ data.tar.gz: b667b2595b967e33c57e4fac153c0c9ec9d02c61504cc5f1015c6d991902694e
5
5
  SHA512:
6
- metadata.gz: 521daa00f341db66db49086c50febc4c092b0f126a7777104b00d6c1072d1ee5ca6786a1bb32f19a5fa2ccad4b693c8e58986a3798e05cb3e61b4ada710e5dc1
7
- data.tar.gz: fd97bc95da594fd38864c05ebf317d4b585a2173e4b76da836e84bc817ce00dc0ecc84dd8b2a26b668f65a533d077b078777938785b862252bfe66025281f7f9
6
+ metadata.gz: 250e8441aa3e71c4367fbeb3885c0eff6219ff29294304763c458cf1f4dd03154bb9afbf55a578dc3e160d4184c1953b9fd7d31ffcd9c867b62ffb7f2c8e646b
7
+ data.tar.gz: 1ab06599328e5a8275c880ccc276ee3fcb9e10dd71e5a9da86902550b7a64dce6d22844741f39daa01a06af90bd5bb7ee6d67381897edc4e47d1c39faa40b0ac
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.travis.yml CHANGED
@@ -1,81 +1,3 @@
1
1
  language: ruby
2
2
 
3
- dist: bionic
4
-
5
- cache:
6
- apt: true
7
- bundler: true
8
-
9
- jobs:
10
- fast_finish: true
11
- allow_failures:
12
- - name: Cabal Packages
13
- env: DIAGRAM=cabal
14
- cache:
15
- directories:
16
- - "$HOME/.cabal"
17
- addons:
18
- apt:
19
- update: true
20
- packages:
21
- - cabal-install
22
- before_install:
23
- - cabal update
24
- - cabal install erd
25
- include:
26
- - name: Apt Packages
27
- env: DIAGRAM=apt
28
- addons:
29
- apt:
30
- update: true
31
- packages:
32
- - graphviz
33
-
34
- - name: Cargo Packages
35
- env: DIAGRAM=cargo
36
- cache: cargo
37
- addons:
38
- apt:
39
- update: true
40
- packages:
41
- - cargo
42
- before_install:
43
- - cargo install svgbob_cli
44
-
45
- - name: Java Packages
46
- env: DIAGRAM=java
47
- addons:
48
- apt:
49
- update: true
50
- packages:
51
- - default-jre-headless
52
-
53
- - name: Npm Packages
54
- env: DIAGRAM=npm
55
- cache: npm
56
- addons:
57
- apt:
58
- update: true
59
- packages:
60
- - npm
61
- before_install:
62
- - npm install -g mermaid.cli nomnoml state-machine-cat
63
- - npm install -g vega-cli vega-lite wavedrom-cli
64
-
65
- - name: Pip Packages
66
- env: DIAGRAM=pip
67
- cache: pip
68
- addons:
69
- apt:
70
- update: true
71
- packages:
72
- - libpython3-dev
73
- - libpango1.0-dev
74
- - python3-pip
75
- - python3-setuptools
76
- - python3-cairo
77
- - python3-gi
78
- before_install:
79
- - pip3 install blockdiag seqdiag actdiag nwdiag syntrax
80
-
81
- script: bundle exec rake 'dummy_site:build[$DIAGRAM]'
3
+ dist: bionic
data/Dockerfile CHANGED
@@ -2,20 +2,50 @@ FROM ubuntu:bionic
2
2
 
3
3
  RUN set -eux; \
4
4
  apt-get update; \
5
- apt-get install -y --no-install-recommends build-essential cabal-install \
6
- cargo default-jre-headless git graphviz libpango1.0-dev \
7
- libpython3-dev npm python3-pip python3-cairo python3-gi \
8
- python3-setuptools ruby ruby-dev
5
+ apt-get install -y --no-install-recommends \
6
+ build-essential \
7
+ git \
8
+ cabal-install \
9
+ cargo \
10
+ default-jre-headless \
11
+ graphviz \
12
+ npm \
13
+ libatk1.0-0 \
14
+ libatk-bridge2.0-0 \
15
+ libgtk-3-0 \
16
+ libx11-xcb1 \
17
+ libxcomposite1 \
18
+ libxrandr2 \
19
+ libxss1 \
20
+ libpango1.0-dev \
21
+ libpython3-dev \
22
+ python3-pip \
23
+ python3-cairo \
24
+ python3-gi \
25
+ python3-setuptools \
26
+ ruby \
27
+ ruby-dev
9
28
 
10
29
  RUN set -eux; \
30
+ cargo install --root /usr/local svgbob_cli; \
11
31
  gem update -N --system; \
12
32
  gem install -N bundler; \
13
- npm install -g --silent mermaid.cli nomnoml state-machine-cat; \
14
- npm install -g vega-cli vega-lite wavedrom-cli; \
15
- pip3 install blockdiag seqdiag actdiag nwdiag syntrax
33
+ npm install -g --silent \
34
+ mermaid.cli \
35
+ nomnoml \
36
+ state-machine-cat \
37
+ vega-cli \
38
+ vega-lite \
39
+ wavedrom-cli; \
40
+ pip3 install \
41
+ blockdiag \
42
+ seqdiag \
43
+ actdiag \
44
+ nwdiag \
45
+ syntrax
16
46
 
17
- WORKDIR /opt/jekyll-diagrams
47
+ WORKDIR /app
18
48
 
19
- COPY . .
49
+ RUN gem install -N jekyll jekyll-diagrams
20
50
 
21
- RUN bundle install
51
+ EXPOSE 4000
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gemspec
3
+ gemspec
4
+
5
+ gem 'coveralls', require: false
data/README.md CHANGED
@@ -207,6 +207,20 @@ Install `mermaid.cli`.
207
207
  $ npm install -g mermaid.cli
208
208
  ```
209
209
 
210
+ **Notice:** You may need to install some missing libraries, follow the output of `mmdc`.
211
+
212
+ #### Examples
213
+
214
+ ```text
215
+ {% mermaid %}
216
+ sequenceDiagram
217
+ participant John
218
+ participant Alice
219
+ Alice->>John: Hello John, how are you?
220
+ John-->>Alice: Great!
221
+ {% endmermaid %}
222
+ ```
223
+
210
224
  #### Configurations
211
225
 
212
226
  | Config | Default | Description |
@@ -319,14 +333,26 @@ initial => "tape player off";
319
333
 
320
334
  #### Prerequisites
321
335
 
322
- - Install `cargo`
323
- - Install `svgbob_cli`
336
+ Install `svgbob_cli`.
324
337
 
325
338
  ```bash
326
339
  $ sudo apt install cargo
327
340
  $ cargo install svgbob_cli
328
341
  ```
329
342
 
343
+ #### Examples
344
+
345
+ ```text
346
+ {% svgbob %}
347
+ .---> F
348
+ A B C D /
349
+ *-------*-----*---*----*-----> E
350
+ \ ^ \
351
+ v / '---> G
352
+ B --> C -'
353
+ {% endsvgbob %}
354
+ ```
355
+
330
356
  #### Configuration
331
357
 
332
358
  | Config | Default | Description |
@@ -340,11 +366,11 @@ $ cargo install svgbob_cli
340
366
 
341
367
  #### Prerequisites
342
368
 
343
- - Install Pango, Cairo and PangoCairo
369
+ - Install Pango, Cairo and PangoCairo support
344
370
  - Install `syntrax`
345
371
 
346
372
  ```bash
347
- $ sudo apt install libpango1.0-dev python3-cairo python3-gi
373
+ $ sudo apt install libpango1.0-dev python3-cairo python3-gi python3-gi-cairo
348
374
  $ pip3 install syntrax
349
375
  ```
350
376
 
@@ -381,6 +407,30 @@ $ npm install -g vega-cli vega-lite
381
407
 
382
408
  The you can use `vega` and `vegalite` tag.
383
409
 
410
+
411
+ #### Examples
412
+
413
+ ```text
414
+ {% vegalite %}
415
+ {
416
+ "": "https://vega.github.io/schema/vega-lite/v4.json",
417
+ "description": "A simple bar chart with embedded data.",
418
+ "data": {
419
+ "values": [
420
+ {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
421
+ {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
422
+ {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
423
+ ]
424
+ },
425
+ "mark": "bar",
426
+ "encoding": {
427
+ "x": {"field": "a", "type": "ordinal"},
428
+ "y": {"field": "b", "type": "quantitative"}
429
+ }
430
+ }
431
+ {% endvegalite %}
432
+ ```
433
+
384
434
  #### Configurations
385
435
 
386
436
  | Config | Default | Description |
data/Rakefile CHANGED
@@ -7,22 +7,4 @@ Rake::TestTask.new(:test) do |t|
7
7
  t.test_files = FileList['test/**/*_test.rb']
8
8
  end
9
9
 
10
- task default: :test
11
-
12
- namespace :dummy_site do
13
- DUMMY_SITE_PATH = File.expand_path('test/dummy_site', __dir__)
14
- DIAGRAMS = %w(apt cabal cargo java npm pip)
15
-
16
- %w(build serve).each do |action|
17
- desc "#{action.capitalize} the dummy site"
18
- task action.to_sym, :diagram do |t, args|
19
- args.with_defaults(diagram: '')
20
- diagram = args[:diagram]
21
- path = File.join(DUMMY_SITE_PATH, diagram)
22
-
23
- Dir.chdir(DUMMY_SITE_PATH) do
24
- %x(bundle install && bundle exec jekyll #{action} --config _config.yml -s #{path})
25
- end
26
- end
27
- end
28
- end
10
+ task default: :test
@@ -8,7 +8,8 @@ require_relative 'jekyll-diagrams/graphviz'
8
8
  require_relative 'jekyll-diagrams/mermaid'
9
9
  require_relative 'jekyll-diagrams/nomnoml'
10
10
  require_relative 'jekyll-diagrams/plantuml'
11
- require_relative 'jekyll-diagrams/svgbob'
12
11
  require_relative 'jekyll-diagrams/smcat'
12
+ require_relative 'jekyll-diagrams/svgbob'
13
+ require_relative 'jekyll-diagrams/syntrax'
13
14
  require_relative 'jekyll-diagrams/vega'
14
15
  require_relative 'jekyll-diagrams/wavedrom'
@@ -4,7 +4,7 @@ module Jekyll
4
4
  def render_svg(code, config)
5
5
  command = build_command(config)
6
6
 
7
- render_with_stdout(command, code) do |command, input|
7
+ render_with_tempfile(command, code, stdout: true) do |command, input|
8
8
  "#{command} #{input}"
9
9
  end
10
10
  end
@@ -21,23 +21,18 @@ module Jekyll
21
21
  end
22
22
  end
23
23
 
24
- def render_with_stdout(command, content)
24
+ def render_with_tempfile(command, content, stdout: false)
25
25
  Tempfile.open('jekyll_diagrams_input') do |input|
26
26
  File.write(input.path, content)
27
27
 
28
- command = yield command, input.path if block_given?
28
+ if stdout == true
29
+ command = yield command, input.path
29
30
 
30
- render_with_command(command, :stdout)
31
- end
32
- end
33
-
34
- def render_with_tempfile(command, content)
35
- Tempfile.open('jekyll_diagrams_input') do |input|
36
- File.write(input.path, content)
37
-
38
- Tempfile.open(['jekyll_diagrams_output', ".svg"]) do |output|
31
+ render_with_command(command, :stdout)
32
+ else
33
+ output = Tempfile.open(['jekyll_diagrams_output', ".svg"])
39
34
  output.close
40
- command = yield command, input.path, output.path if block_given?
35
+ command = yield command, input.path, output.path
41
36
 
42
37
  render_with_command(command, output.path)
43
38
  end
@@ -6,7 +6,7 @@ module Jekyll
6
6
  def render_svg(code, config)
7
7
  command = build_command(config)
8
8
 
9
- svg = render_with_stdout(command, code) do |command, input|
9
+ svg = render_with_tempfile(command, code, stdout: true) do |command, input|
10
10
  "#{command} #{input} -"
11
11
  end
12
12
 
@@ -4,22 +4,20 @@ module Jekyll
4
4
  CONFIGURATIONS = %w( scale )
5
5
 
6
6
  def render_svg(code, config)
7
+ code = render_with_stdin_stdout('vl2vg', code) if block_name == 'vegalite'
7
8
  command = build_command(config)
8
9
 
9
10
  render_with_stdin_stdout(command, code)
10
11
  end
11
12
 
12
13
  def build_command(config)
13
- command = case block_name
14
- when 'vega'
15
- 'vg2svg'
16
- when 'vegalite'
17
- 'vl2svg'
18
- end
14
+ command = 'vg2svg'
19
15
 
20
16
  CONFIGURATIONS.each do |conf|
21
17
  command << " --#{conf} #{config[conf]}" if config.has_key?(conf)
22
18
  end
19
+
20
+ command
23
21
  end
24
22
  end
25
23
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Diagrams
3
- VERSION = '0.9.0'
3
+ VERSION = '0.9.1'
4
4
  end
5
5
  end
data/test/test_helper.rb CHANGED
@@ -1,5 +1,16 @@
1
- require 'jekyll'
1
+
2
+ lib = File.expand_path('../lib', __dir__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'coveralls'
6
+
7
+ Coveralls.wear!
8
+
2
9
  require 'fileutils'
3
- require File.expand_path('../lib/jekyll-diagrams', __dir__)
10
+ require 'jekyll'
11
+
12
+ require 'jekyll-diagrams/util'
13
+ require 'jekyll-diagrams/renderer'
14
+ require 'jekyll-diagrams/block'
4
15
 
5
16
  require 'minitest/autorun'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-diagrams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhustec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-08 00:00:00.000000000 Z
11
+ date: 2020-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -79,6 +79,7 @@ executables: []
79
79
  extensions: []
80
80
  extra_rdoc_files: []
81
81
  files:
82
+ - ".coveralls.yml"
82
83
  - ".gitignore"
83
84
  - ".travis.yml"
84
85
  - Dockerfile
@@ -103,20 +104,6 @@ files:
103
104
  - lib/jekyll-diagrams/vega.rb
104
105
  - lib/jekyll-diagrams/version.rb
105
106
  - lib/jekyll-diagrams/wavedrom.rb
106
- - test/dummy_site/Gemfile
107
- - test/dummy_site/_config.yml
108
- - test/dummy_site/apt/graphviz.md
109
- - test/dummy_site/cabal/erd.md
110
- - test/dummy_site/cargo/svgbob.md
111
- - test/dummy_site/index.md
112
- - test/dummy_site/java/plantuml.md
113
- - test/dummy_site/npm/mermaid.md
114
- - test/dummy_site/npm/nomnoml.md
115
- - test/dummy_site/npm/smcat.md
116
- - test/dummy_site/npm/vega.md
117
- - test/dummy_site/npm/wavedrom.md
118
- - test/dummy_site/pip/blockdiag.md
119
- - test/dummy_site/pip/syntrax.md
120
107
  - test/test_helper.rb
121
108
  - vendor/mermaid_puppeteer_config.json
122
109
  - vendor/plantuml.1.2020.1.jar
@@ -146,18 +133,4 @@ specification_version: 4
146
133
  summary: Jekyll plugins for diagrams support, including Graphviz, Blockdiag, PlantUML
147
134
  and so on.
148
135
  test_files:
149
- - test/dummy_site/Gemfile
150
- - test/dummy_site/_config.yml
151
- - test/dummy_site/apt/graphviz.md
152
- - test/dummy_site/cabal/erd.md
153
- - test/dummy_site/cargo/svgbob.md
154
- - test/dummy_site/index.md
155
- - test/dummy_site/java/plantuml.md
156
- - test/dummy_site/npm/mermaid.md
157
- - test/dummy_site/npm/nomnoml.md
158
- - test/dummy_site/npm/smcat.md
159
- - test/dummy_site/npm/vega.md
160
- - test/dummy_site/npm/wavedrom.md
161
- - test/dummy_site/pip/blockdiag.md
162
- - test/dummy_site/pip/syntrax.md
163
136
  - test/test_helper.rb
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "jekyll", "~> 4.0.0"
4
- gem "minima", "~> 2.5"
5
-
6
- group :jekyll_plugins do
7
- gem "jekyll-diagrams", path: "../../"
8
- end
@@ -1,21 +0,0 @@
1
- title: Dummy Site
2
- description: This is a dummy site for testing.
3
-
4
- theme: minima
5
- plugins:
6
- - jekyll-diagrams
7
-
8
- jekyll-diagrams:
9
- graphviz:
10
- default_layout: dot
11
- graph_attribute: color=red
12
- node_attribute:
13
- - color=blue
14
- - fillcolor=red
15
- edge_attribute:
16
- color: red
17
- fillcolor: blue
18
- blockdiag:
19
- antialias: true
20
- syntax:
21
- transparent: true
@@ -1,20 +0,0 @@
1
- ---
2
- layout: home
3
- title: Graphviz Test
4
- ---
5
-
6
- {% graphviz %}
7
- digraph {
8
- node [shape=circle, style=filled];
9
- S ;
10
- A ;
11
- B ;
12
- C ;
13
- D [shape=doublecircle, fillcolor=green];
14
- S -> A [label=a];
15
- S -> B [label=b];
16
- A -> D [label=c];
17
- B -> D [label=d];
18
- }
19
- {% endgraphviz %}
20
-
@@ -1,115 +0,0 @@
1
- ---
2
- layout: home
3
- title: Erd Test
4
- ---
5
-
6
- # Erd Test
7
-
8
- {% erd %}
9
- [Person]
10
- *name
11
- height
12
- weight
13
- `birth date`
14
- +birth_place_id
15
-
16
- [`Birth Place`]
17
- *id
18
- `birth city`
19
- 'birth state'
20
- "birth country"
21
-
22
- # Each relationship must be between exactly two entities, which need not
23
- # be distinct. Each entity in the relationship has exactly one of four
24
- # possible cardinalities:
25
- #
26
- # Cardinality Syntax
27
- # 0 or 1 ?
28
- # exactly 1 1
29
- # 0 or more *
30
- # 1 or more +
31
- Person *--1 `Birth Place`
32
- {% enderd %}
33
-
34
- {% erd %}
35
- title {label: "nfldb Entity-Relationship diagram (condensed)", size: "20"}
36
-
37
- # Entities
38
-
39
- [player] {bgcolor: "#d0e0d0"}
40
- *player_id {label: "varchar, not null"}
41
- full_name {label: "varchar, null"}
42
- team {label: "varchar, not null"}
43
- position {label: "player_pos, not null"}
44
- status {label: "player_status, not null"}
45
-
46
- [team] {bgcolor: "#d0e0d0"}
47
- *team_id {label: "varchar, not null"}
48
- city {label: "varchar, not null"}
49
- name {label: "varchar, not null"}
50
-
51
- [game] {bgcolor: "#ececfc"}
52
- *gsis_id {label: "gameid, not null"}
53
- start_time {label: "utctime, not null"}
54
- week {label: "usmallint, not null"}
55
- season_year {label: "usmallint, not null"}
56
- season_type {label: "season_phase, not null"}
57
- finished {label: "boolean, not null"}
58
- home_team {label: "varchar, not null"}
59
- home_score {label: "usmallint, not null"}
60
- away_team {label: "varchar, not null"}
61
- away_score {label: "usmallint, not null"}
62
-
63
- [drive] {bgcolor: "#ececfc"}
64
- *+gsis_id {label: "gameid, not null"}
65
- *drive_id {label: "usmallint, not null"}
66
- start_field {label: "field_pos, null"}
67
- start_time {label: "game_time, not null"}
68
- end_field {label: "field_pos, null"}
69
- end_time {label: "game_time, not null"}
70
- pos_team {label: "varchar, not null"}
71
- pos_time {label: "pos_period, null"}
72
-
73
- [play] {bgcolor: "#ececfc"}
74
- *+gsis_id {label: "gameid, not null"}
75
- *+drive_id {label: "usmallint, not null"}
76
- *play_id {label: "usmallint, not null"}
77
- time {label: "game_time, not null"}
78
- pos_team {label: "varchar, not null"}
79
- yardline {label: "field_pos, null"}
80
- down {label: "smallint, null"}
81
- yards_to_go {label: "smallint, null"}
82
-
83
- [play_player] {bgcolor: "#ececfc"}
84
- *+gsis_id {label: "gameid, not null"}
85
- *+drive_id {label: "usmallint, not null"}
86
- *+play_id {label: "usmallint, not null"}
87
- *+player_id {label: "varchar, not null"}
88
- team {label: "varchar, not null"}
89
-
90
- [meta] {bgcolor: "#fcecec"}
91
- version {label: "smallint, null"}
92
- season_type {label: "season_phase, null"}
93
- season_year {label: "usmallint, null"}
94
- week {label: "usmallint, null"}
95
-
96
- # Relationships
97
-
98
- player *--1 team
99
- game *--1 team {label: "home"}
100
- game *--1 team {label: "away"}
101
- drive *--1 team
102
- play *--1 team
103
- play_player *--1 team
104
-
105
- game 1--* drive
106
- game 1--* play
107
- game 1--* play_player
108
-
109
- drive 1--* play
110
- drive 1--* play_player
111
-
112
- play 1--* play_player
113
-
114
- player 1--* play_player
115
- {% enderd %}
@@ -1,14 +0,0 @@
1
- ---
2
- layout: home
3
- title: Svgbob Test
4
- ---
5
-
6
- {% svgbob %}
7
- .---.
8
- /-o-/--
9
- .-/ / /->
10
- ( * \/
11
- '-. \
12
- \ /
13
- '
14
- {% endsvgbob %}
@@ -1,7 +0,0 @@
1
- ---
2
- layout: home
3
- ---
4
-
5
- {% for page in site.pages %}
6
- - [**{{ page.title }}**]({{ page.url }})
7
- {% endfor %}
@@ -1,77 +0,0 @@
1
- ---
2
- layout: home
3
- title: PlantUML Test
4
- ---
5
-
6
- {% plantuml %}
7
- @startuml
8
- actor Foo1
9
- boundary Foo2
10
- control Foo3
11
- entity Foo4
12
- database Foo5
13
- collections Foo6
14
- Foo1 -> Foo2 : To boundary
15
- Foo1 -> Foo3 : To control
16
- Foo1 -> Foo4 : To entity
17
- Foo1 -> Foo5 : To database
18
- Foo1 -> Foo6 : To collections
19
-
20
- @enduml
21
- {% endplantuml %}
22
-
23
-
24
- {% plantuml %}
25
- @startuml
26
- :Main Admin: as Admin
27
- (Use the application) as (Use)
28
-
29
- User -> (Start)
30
- User --> (Use)
31
-
32
- Admin ---> (Use)
33
-
34
- note right of Admin : This is an example.
35
-
36
- note right of (Use)
37
- A note can also
38
- be on several lines
39
- end note
40
-
41
- note "This note is connected\nto several objects." as N2
42
- (Start) .. N2
43
- N2 .. (Use)
44
- @enduml
45
- {% endplantuml %}
46
-
47
- {% plantuml %}
48
- @startuml
49
- class Car
50
-
51
- Driver - Car : drives >
52
- Car *- Wheel : have 4 >
53
- Car -- Person : < owns
54
-
55
- @enduml
56
- {% endplantuml %}
57
-
58
- {% plantuml %}
59
- @startuml
60
- nwdiag {
61
- network dmz {
62
- address = "210.x.x.x/24"
63
-
64
- web01 [address = "210.x.x.1"];
65
- web02 [address = "210.x.x.2"];
66
- }
67
- network internal {
68
- address = "172.x.x.x/24";
69
-
70
- web01 [address = "172.x.x.1"];
71
- web02 [address = "172.x.x.2"];
72
- db01;
73
- db02;
74
- }
75
- }
76
- @enduml
77
- {% endplantuml %}
@@ -1,62 +0,0 @@
1
- ---
2
- layout: home
3
- title: Mermaid Test
4
- ---
5
-
6
- {% mermaid %}
7
- graph TB
8
- c1-->a2
9
- subgraph one
10
- a1-->a2
11
- end
12
- subgraph two
13
- b1-->b2
14
- end
15
- subgraph three
16
- c1-->c2
17
- end
18
- {% endmermaid %}
19
-
20
- {% mermaid %}
21
- sequenceDiagram
22
- participant John
23
- participant Alice
24
- Alice->>John: Hello John, how are you?
25
- John-->>Alice: Great!
26
- {% endmermaid %}
27
-
28
- {% mermaid %}
29
- classDiagram
30
- Animal <|-- Duck
31
- Animal <|-- Fish
32
- Animal <|-- Zebra
33
- Animal : +int age
34
- Animal : +String gender
35
- Animal: +isMammal()
36
- Animal: +mate()
37
- class Duck{
38
- +String beakColor
39
- +swim()
40
- +quack()
41
- }
42
- class Fish{
43
- -int sizeInFeet
44
- -canEat()
45
- }
46
- class Zebra{
47
- +bool is_wild
48
- +run()
49
- }
50
- {% endmermaid %}
51
-
52
- {% mermaid %}
53
- gantt
54
- title A Gantt Diagram
55
- dateFormat YYYY-MM-DD
56
- section Section
57
- A task :a1, 2014-01-01, 30d
58
- Another task :after a1 , 20d
59
- section Another
60
- Task in sec :2014-01-12 , 12d
61
- another task : 24d
62
- {% endmermaid %}
@@ -1,27 +0,0 @@
1
- ---
2
- layout: home
3
- title: Nomnoml Test
4
- ---
5
-
6
- {% nomnoml %}
7
- [Pirate|eyeCount: Int|raid();pillage()|
8
- [beard]--[parrot]
9
- [beard]-:>[foul mouth]
10
- ]
11
-
12
- [<abstract>Marauder]<:--[Pirate]
13
- [Pirate]- 0..7[mischief]
14
- [jollyness]->[Pirate]
15
- [jollyness]->[rum]
16
- [jollyness]->[singing]
17
- [Pirate]-> *[rum|tastiness: Int|swig()]
18
- [Pirate]->[singing]
19
- [singing]<->[rum]
20
-
21
- [<start>st]->[<state>plunder]
22
- [plunder]->[<choice>more loot]
23
- [more loot]->[st]
24
- [more loot] no ->[<end>e]
25
-
26
- [<actor>Sailor] - [<usecase>shiver me;timbers]
27
- {% endnomnoml %}
@@ -1,21 +0,0 @@
1
- ---
2
- layout: home
3
- title: State Machine Cat Test
4
- ---
5
-
6
- {% smcat %}
7
- initial,
8
- doing: entry/ write unit test
9
- do/ write code
10
- exit/ ...,
11
- # smcat recognizes initial
12
- # and final states by name
13
- # and renders them appropriately
14
- final;
15
-
16
- initial => "on backlog" : item adds most value;
17
- "on backlog" => doing : working on it;
18
- doing => testing : built & unit tested;
19
- testing => "on backlog" : test not ok;
20
- testing => final : test ok;
21
- {% endsmcat %}
@@ -1,103 +0,0 @@
1
- ---
2
- layout: home
3
- title: Vega Test
4
- ---
5
-
6
- {% vega %}
7
- {
8
- "$schema": "https://vega.github.io/schema/vega/v5.json",
9
- "description": "A basic bar chart example, with value labels shown upon mouse hover.",
10
- "width": 400,
11
- "height": 200,
12
- "padding": 5,
13
-
14
- "data": [
15
- {
16
- "name": "table",
17
- "values": [
18
- {"category": "A", "amount": 28},
19
- {"category": "B", "amount": 55},
20
- {"category": "C", "amount": 43},
21
- {"category": "D", "amount": 91},
22
- {"category": "E", "amount": 81},
23
- {"category": "F", "amount": 53},
24
- {"category": "G", "amount": 19},
25
- {"category": "H", "amount": 87}
26
- ]
27
- }
28
- ],
29
-
30
- "signals": [
31
- {
32
- "name": "tooltip",
33
- "value": {},
34
- "on": [
35
- {"events": "rect:mouseover", "update": "datum"},
36
- {"events": "rect:mouseout", "update": "{}"}
37
- ]
38
- }
39
- ],
40
-
41
- "scales": [
42
- {
43
- "name": "xscale",
44
- "type": "band",
45
- "domain": {"data": "table", "field": "category"},
46
- "range": "width",
47
- "padding": 0.05,
48
- "round": true
49
- },
50
- {
51
- "name": "yscale",
52
- "domain": {"data": "table", "field": "amount"},
53
- "nice": true,
54
- "range": "height"
55
- }
56
- ],
57
-
58
- "axes": [
59
- { "orient": "bottom", "scale": "xscale" },
60
- { "orient": "left", "scale": "yscale" }
61
- ],
62
-
63
- "marks": [
64
- {
65
- "type": "rect",
66
- "from": {"data":"table"},
67
- "encode": {
68
- "enter": {
69
- "x": {"scale": "xscale", "field": "category"},
70
- "width": {"scale": "xscale", "band": 1},
71
- "y": {"scale": "yscale", "field": "amount"},
72
- "y2": {"scale": "yscale", "value": 0}
73
- },
74
- "update": {
75
- "fill": {"value": "steelblue"}
76
- },
77
- "hover": {
78
- "fill": {"value": "red"}
79
- }
80
- }
81
- },
82
- {
83
- "type": "text",
84
- "encode": {
85
- "enter": {
86
- "align": {"value": "center"},
87
- "baseline": {"value": "bottom"},
88
- "fill": {"value": "#333"}
89
- },
90
- "update": {
91
- "x": {"scale": "xscale", "signal": "tooltip.category", "band": 0.5},
92
- "y": {"scale": "yscale", "signal": "tooltip.amount", "offset": -2},
93
- "text": {"signal": "tooltip.amount"},
94
- "fillOpacity": [
95
- {"test": "datum === tooltip", "value": 0},
96
- {"value": 1}
97
- ]
98
- }
99
- }
100
- }
101
- ]
102
- }
103
- {% endvega %}
@@ -1,13 +0,0 @@
1
- ---
2
- layout: home
3
- title: Wavedrom Test
4
- ---
5
-
6
- {% wavedrom %}
7
- {signal: [
8
- {name: 'clk', wave: 'p.....|...'},
9
- {name: 'dat', wave: 'x.345x|=.x', data: ['head', 'body', 'tail', 'data']},
10
- {name: 'req', wave: '0.1..0|1.0'},
11
- {name: 'ack', wave: '1.....|01.'}
12
- ]}
13
- {% endwavedrom %}
@@ -1,26 +0,0 @@
1
- ---
2
- layout: home
3
- title: Blockdiag Test
4
- ---
5
-
6
- ## Blockdiag
7
-
8
- {% blockdiag %}
9
- blockdiag {
10
- A -> B -> C -> D;
11
- A -> E -> F -> G;
12
- }
13
- {% endblockdiag %}
14
-
15
- ## Seqdiag
16
-
17
- {% seqdiag %}
18
- seqdiag {
19
- browser -> webserver [label = "GET /index.html"];
20
- browser <-- webserver;
21
- browser -> webserver [label = "POST /blog/comment"];
22
- webserver -> database [label = "INSERT comment"];
23
- webserver <-- database;
24
- browser <-- webserver;
25
- }
26
- {% endseqdiag %}
@@ -1,13 +0,0 @@
1
- ---
2
- layout: home
3
- title: Syntrax Test
4
- ---
5
-
6
- {% syntrax %}
7
- indentstack(10,
8
- line(opt('-'), choice('0', line('1-9', loop(None, '0-9'))),
9
- opt('.', loop('0-9', None))),
10
-
11
- line(opt(choice('e', 'E'), choice(None, '+', '-'), loop('0-9', None)))
12
- )
13
- {% endsyntrax %}