[build.mermaid]¶
Mermaid settings shared by every builder.
ubc build pdf draws mermaid diagrams with ubCode’s own Mermaid, inside a
Chromium-family browser already installed on the machine (Chrome, Edge,
Chromium, Brave, or a chrome-headless-shell), started headless on a
throwaway profile with every network request a diagram makes blocked. No
node, npm package or Mermaid CLI is needed.
A builder’s own table, such as [build.pdf.mermaid], inherits every key it
does not set from this one and wins on every key it does.
Guide: Mermaid diagrams.
- build.mermaid.browser¶
- Type:
- string
- Default:
""
The browser executable that draws the diagrams.
Unset or
"", the browser is looked for in the usual install locations (Chrome, then Edge, Chromium and Brave; on Windows also the registry’s App Paths) and then on the absolute entries ofPATH— unless theUBCODE_MERMAID_DISCOVERYenvironment variable isoff. A bare name (chromium) is looked up on the absolute entries ofPATH, even with discovery off; a value containing a path separator is taken relative to thisubproject.toml, and{config_dir}is replaced with that directory. TheUBCODE_MERMAID_BROWSERenvironment variable, when set, is used instead.
- build.mermaid.browser_args¶
- Type:
- array of strings
- Default:
[]
Extra command-line switches for the browser. Empty by default.
Chromium’s sandbox cannot start inside many containers or when the build runs as root;
["--no-sandbox"]is the usual remedy there. It turns off a protection of the browser, so set it only where it is needed — ubCode never adds it itself. Switches that would undo one of ubCode’s controls (a debugging port, another profile or proxy, the host resolver rules, web security, extensions, and the like) are refused and reported asbuild.mermaid_exec_failed; a refused switch never reaches the browser.{config_dir}is replaced with thisubproject.toml’s directory.
- build.mermaid.min_version¶
- Type:
- string
- Default:
""
The oldest browser version this project accepts, written like
140or154.0.8037.58.This can only RAISE the bar: the built-in minimum is
131, and a lower value is reported asbuild.mermaid_exec_failedand ignored in favour of that minimum. Unset or""means131. Diagram appearance can change between browser releases.
- build.mermaid.timeout¶
- Type:
- integer
- Default:
30
How long ONE diagram may take to draw, in seconds.
A diagram still drawing when it expires is reported as
build.mermaid_render_failedand keeps its placeholder box; the other diagrams are unaffected. Defaults to 30;0, and more than a day, are refused asbuild.mermaid_exec_failed.