Convert Markdown to HTML with Mermaid diagrams, syntax highlighting, and dark theme using mdtohtml. Use when generating HTML from .md files, exporting system design reports, or rendering markdown with diagrams for web viewing.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Convert Markdown to HTML with Mermaid diagrams, syntax highlighting, and dark theme using mdtohtml. Use when generating HTML from .md files, exporting system design reports, or rendering markdown with diagrams for web viewing.
cd c:\Projects\SystemDesign
python tools/md_to_html.py sysml-v2-models/projects/leo-cubesat-laser-comm/outputs/system-design-report/leo-laser-comm-PAT-system-design-merged.md
# Merge all sections into one .md# (use PowerShell script above or write a shell script)# Convert to HTML
python tools/md_to_html.py leo-laser-comm-PAT-system-design-merged.md
Error: prints error to stderr, exits with code 1 or 2
Best Practices
Use Python for merging — tools/merge_markdown.py eliminates encoding corruption (see references/merge_markdown.py)
Merge before exporting — For system design reports, merge sections into one .md, then convert
Validate Mermaid before export — Run mmdc on merged .md to catch parse errors before HTML conversion: mmdc -i leo-laser-comm-PAT-system-design-merged.md
Don't store HTML in git — HTML is derived; keep only .md files in git
Validate before sharing — Check diagrams render and special characters display correctly
Archive exports — Save HTML snapshots when publishing stable versions
One merged file per report — Use one leo-laser-comm-PAT-system-design-merged.md → leo-laser-comm-PAT-system-design-merged.html
UTF-8 everywhere — Python's explicit UTF-8 handling is the key to preserving Unicode through the pipeline