class Jekyll::Diagrams::MermaidRenderer
Constants
- CONFIGURATIONS
Public Instance Methods
build_command(config)
click to toggle source
# File lib/jekyll-diagrams/mermaid/renderer.rb, line 17 def build_command(config) command = +'mmdc --puppeteerConfigFile ' command << Utils.vendor_path('mermaid_puppeteer_config.json') CONFIGURATIONS.each do |conf| command << " --#{conf} #{config[conf]}" if config.key?(conf) end command end
render_svg(code, config)
click to toggle source
# File lib/jekyll-diagrams/mermaid/renderer.rb, line 9 def render_svg(code, config) command = build_command(config) render_with_tempfile(command, code) do |input, output| "--input #{input} --output #{output}" end end