Loading...
Loading...
Convert markdown to beautifully styled Word documents using custom templates. Supports branded fonts, colors, and table styling. Extract styles from existing docs or generate fresh templates.
npx skill4agent add jonnyschneider/skills md-to-docx-templatepandocbrew install pandocpython-docxlxmlclickpyyamlgit clone https://github.com/jonnyschneider/skills.git
cd skills/skills/md-to-docx-template
pip install python-docx lxml click pyyaml./md-to-docx.py input.md -o output.docx./create-reference-template.py template.docx \
--font-body "DM Sans" \
--font-heading "DM Sans" \
--accent-color "0D494D" \
--heading-color "0D494D"
./md-to-docx.py input.md -o output.docx --template template.docx# Full pipeline for best results:
./extract-styles.py source-branded.docx template.docx
./md-to-docx.py input.md -o output.docx --template template.docx --no-fix-indent
./apply-template-styles.py template.docx output.docx
./fix-table-headers.py output.docxmanifest.yamltemplate: template.docx
output: final-document.docx
sections:
- 01-intro.md
- 02-content.md
- 03-conclusion.md./md-to-docx.py manifest.yaml --open| Option | Description |
|---|---|
| Output DOCX path |
| Custom reference template |
| Generate table of contents |
| Open after building |
| Skip list indent fix (use with extract pipeline) |
| Option | Description |
|---|---|
| Body text font (default: Calibri) |
| Heading font (default: Calibri) |
| Code font (default: Consolas) |
| Table header color (hex, default: 4472C4) |
| Heading text color (hex, default: 000000) |
rsvg-convert