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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a34d1f0880faf28ea419d33b43b7583d5eccf6bff70c720e5b03b468b2b875c5
4
- data.tar.gz: 6576e6212125748aeb86da97cdb737798c093d57e3995215921b9177a4cb826d
3
+ metadata.gz: 3fef549547d8ff55159df37f74fa1e1fa2a48e3713a2994442153cba2a0e9c7e
4
+ data.tar.gz: c2eba8b5bbdca9838911968455522844d824442ae94c1eeb95228ea3852fc417
5
5
  SHA512:
6
- metadata.gz: 92d3a5a8e343bc9539056dc61c1d0ced79e90d8299868a79710c24cc44458687a0a448c09efcd917669f1e8a222877aba07f77ef3945355d510ca9a0809bea18
7
- data.tar.gz: be346f0a9bc2c7d00c84b58e660e8aff716fce9807e2383a98d8e14f4509bf16d1a59960a769725107dc15e95ca18ed2007e30f94f8c3da6fbbc8d6851265e74
6
+ metadata.gz: 84b14240adbf5c5ed0f81fd7823408fa1ad58c7351eadfdfae4faa719d67144ed27fd51ad0bd93146f7e9a8271de4f91a0d77c3d164107211ffd3394790c1352
7
+ data.tar.gz: 4eff287cd3b62b46186fee052cbd1912ba623da8c855bf8dc8151ea1cf7899afb1b8f27281fe98d3b60690c275200bce123a0a835a5e56c2e94e1da89d07f2dd
@@ -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)
@@ -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) or raise "#{@blockclass} error: #{super}"
38
- site.static_files << Jekyll::StaticFile.new(
39
- site, site.source, path, imgfile
40
- )
41
- @logger.debug("File #{imgfile} created (#{File.size(img)} bytes)")
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.0
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-04 00:00:00.000000000 Z
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: []