Troubleshooting flowcharts written in Mermaid, rendered to PDF.
- Node.js 22.18 or later (
render.tsis run directly, without a build step) - Chromium. The path is hardcoded as
PUPPETEER_EXECUTABLE_PATHinrender.ts; change it if yours lives elsewhere.
$ npm install
$ npm run buildThe PDFs are written to dist/.
Rendering needs an internet connection: Mermaid and the ELK layout engine are
loaded from a CDN by page.html.
Diagrams live in diagrams/, as .mmd files:
- A file directly in
diagrams/becomes its own PDF. - A subdirectory becomes one PDF with a page per file.
Files within a subdirectory are ordered by their numeric prefix, and the document title is derived from the file or directory name. Page orientation is chosen per diagram, based on its aspect ratio.
Note
While GitHub renders a preview of Mermaid diagrams, it does not support the ELK renderer and lacks the custom style rules, so those previews are not representative of the rendered result.
The diagrams in diagrams/ and the PDFs rendered from them are licensed under
CC BY 4.0.
The build script (render.ts and page.html) is licensed under the
MIT license.