jekyll-local-diagram 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/block/bpmn-block.rb +16 -0
- data/lib/block/raw-block.rb +1 -0
- data/lib/jekyll-local-diagram.rb +10 -5
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fef549547d8ff55159df37f74fa1e1fa2a48e3713a2994442153cba2a0e9c7e
|
4
|
+
data.tar.gz: c2eba8b5bbdca9838911968455522844d824442ae94c1eeb95228ea3852fc417
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84b14240adbf5c5ed0f81fd7823408fa1ad58c7351eadfdfae4faa719d67144ed27fd51ad0bd93146f7e9a8271de4f91a0d77c3d164107211ffd3394790c1352
|
7
|
+
data.tar.gz: 4eff287cd3b62b46186fee052cbd1912ba623da8c855bf8dc8151ea1cf7899afb1b8f27281fe98d3b60690c275200bce123a0a835a5e56c2e94e1da89d07f2dd
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module JekyllLocalDiagram
|
2
|
+
class BpmnBlock < JekyllLocalDiagramBlock
|
3
|
+
def initialize(tag_name, markup, tokens)
|
4
|
+
super
|
5
|
+
@ext = 'bpmn'
|
6
|
+
@blockclass = 'bpmn'
|
7
|
+
end
|
8
|
+
|
9
|
+
def build_cmd(input, output)
|
10
|
+
"bpmn-to-image #{input}:#{output}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
Liquid::Template.register_tag('mathjax', JekyllLocalDiagram::MathJaxBlock)
|
16
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
Liquid::Template.register_tag('raw', Liquid::Raw)
|
data/lib/jekyll-local-diagram.rb
CHANGED
@@ -34,11 +34,14 @@ module JekyllLocalDiagram
|
|
34
34
|
}
|
35
35
|
cmd = build_cmd(txtfile, img)
|
36
36
|
@logger.debug("Executing #{@blockclass} command: #{cmd}")
|
37
|
-
system(cmd)
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
if !system(cmd)
|
38
|
+
@logger.error("#{@blockclass} error: #{super}")
|
39
|
+
else
|
40
|
+
site.static_files << Jekyll::StaticFile.new(
|
41
|
+
site, site.source, path, imgfile
|
42
|
+
)
|
43
|
+
@logger.debug("File #{imgfile} created (#{File.size(img)} bytes)")
|
44
|
+
end
|
42
45
|
end
|
43
46
|
end
|
44
47
|
"<p><object data='#{site.baseurl}/#{path}/#{imgfile}' type='image/#{mimetype}' #{@html} class='#{@blockclass}'></object></p>"
|
@@ -49,4 +52,6 @@ end
|
|
49
52
|
require 'block/plantuml-block'
|
50
53
|
require 'block/mermaid-block'
|
51
54
|
require 'block/mathjax-block'
|
55
|
+
require 'block/bpmn-block'
|
56
|
+
require 'block/raw-block'
|
52
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-local-diagram
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Knight
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -46,9 +46,11 @@ extra_rdoc_files: []
|
|
46
46
|
files:
|
47
47
|
- cfg/puppeteer.json
|
48
48
|
- ext/plantuml.jar
|
49
|
+
- lib/block/bpmn-block.rb
|
49
50
|
- lib/block/mathjax-block.rb
|
50
51
|
- lib/block/mermaid-block.rb
|
51
52
|
- lib/block/plantuml-block.rb
|
53
|
+
- lib/block/raw-block.rb
|
52
54
|
- lib/jekyll-local-diagram.rb
|
53
55
|
homepage: https://github.com/hackinghat/jekyll-local-diagram
|
54
56
|
licenses:
|
@@ -73,5 +75,5 @@ rubygems_version: 3.3.7
|
|
73
75
|
signing_key:
|
74
76
|
specification_version: 4
|
75
77
|
summary: Generate local diagrams with support for non-UML diagrams, to be used with
|
76
|
-
jekyll-local-diagrams-build-action
|
78
|
+
jekyll-local-diagrams-build-action inculdes PPlantUML
|
77
79
|
test_files: []
|