jekyll-local-diagram 0.1.0 → 0.1.3
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 +4 -4
- data/cfg/puppeteer.json +1 -0
- 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 +6 -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
|
data/cfg/puppeteer.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{ "args":["--no-sandbox"] }
|
@@ -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
|
@@ -44,10 +44,13 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- cfg/puppeteer.json
|
47
48
|
- ext/plantuml.jar
|
49
|
+
- lib/block/bpmn-block.rb
|
48
50
|
- lib/block/mathjax-block.rb
|
49
51
|
- lib/block/mermaid-block.rb
|
50
52
|
- lib/block/plantuml-block.rb
|
53
|
+
- lib/block/raw-block.rb
|
51
54
|
- lib/jekyll-local-diagram.rb
|
52
55
|
homepage: https://github.com/hackinghat/jekyll-local-diagram
|
53
56
|
licenses:
|
@@ -72,5 +75,5 @@ rubygems_version: 3.3.7
|
|
72
75
|
signing_key:
|
73
76
|
specification_version: 4
|
74
77
|
summary: Generate local diagrams with support for non-UML diagrams, to be used with
|
75
|
-
jekyll-local-diagrams-build-action
|
78
|
+
jekyll-local-diagrams-build-action inculdes PPlantUML
|
76
79
|
test_files: []
|