Browse Source

PlantUML Update

Speicherbedarf reduziert, Aufruf vereinfacht
master
Christian Aust 2 weeks ago
parent
commit
fd194bcaf9
  1. 2
      Dockerfile
  2. BIN
      _plugins/plantuml.jar
  3. 5
      _plugins/plantuml.rb

2
Dockerfile

@ -5,7 +5,7 @@ FROM jekyll/jekyll:4.2.0 as builder
ENV TZ=Europe/Berlin \
JEKYLL_ENV=production \
PLANTUML_VERSION=1.2021.12
PLANTUML_VERSION=1.2021.14
RUN apk add --no-cache openjdk8-jre graphviz ttf-droid ttf-droid-nonlatin

BIN
_plugins/plantuml.jar

Binary file not shown.

5
_plugins/plantuml.rb

@ -27,8 +27,9 @@ require 'tempfile'
module Jekyll
class PlantumlBlock < Liquid::Block
CONFIG_DEFAULT = {
'executable' => "java -Djava.awt.headless=true -jar #{File.join(__dir__, 'plantuml.jar')}",
'executable' => "java -Xms128M -Xmx256M -Djava.awt.headless=true -jar #{File.join(__dir__, 'plantuml.jar')}",
'options' => '-nometadata -pipeNoStderr -pipe'
'theme' => 'sandstone'
}
LOGGER_TOPIC = 'PlantUML:'
@ -62,7 +63,7 @@ module Jekyll
tmpfile.close
Jekyll.logger.info LOGGER_TOPIC, "Temp file #{tmpfile.path} created (#{File.size(tmpfile.path)} bytes)"
end
cmd = "cat #{tmpfile.path} | #{config(context)['executable']} #{config(context)['options']} -tsvg > #{svg}"
cmd = "#{config(context)['executable']} #{config(context)['options']} -tsvg > #{svg} < #{tmpfile.path}"
if system(cmd)
site.static_files << Jekyll::StaticFile.new(
site, site.source, 'public/images/uml', "#{name}.svg"

Loading…
Cancel
Save