README
Guide to validating Mermaid diagrams in markdown files using CLI tools, pre-commit hooks, and CI/CD pipelines.
Documents
| Document | Description |
|---|---|
| Validation Tools & CLI | CLI tools and validators for Mermaid syntax checking |
| CI/CD & Pre-commit Integration | Setting up validation in automated workflows |
Overview
Mermaid diagrams embedded in markdown files can contain syntax errors that break rendering. Validation tools catch these errors during development, pre-commit, or CI/CD stages before they reach production.
Quick Start
Install Official Mermaid CLI
npm install -g @mermaid-js/mermaid-cliValidate a Diagram
mmdc -i diagram.mmd -o /tmp/test.svgValidate All Diagrams in Markdown
npm install -g mermaid-validatemermaid-validate validate-md document.mdRelated Research
- Markdown Validation Tools - General markdown syntax validation
- Documentation Automation - Automated diagram generation workflows