Sign inSign up

revil0/madmermaidoc

By revil0

Updated 7 months ago

Convert Markdown to Word/PDF with Mermaid diagram rendering & syntax highlighting in a nice WebGUI.

Image
Web servers
0

287

revil0/madmermaidoc repository overview

MaDMermaiDoc Studio

Docker Image Version Docker Pulls

Convert Markdown to Word documents with Mermaid diagram rendering and syntax highlighting.

Features

  • Convert Markdown to Word (.docx) & PDF documents
  • Auto-detect and render Mermaid diagrams
  • Code syntax highlighting (powered by Shiki)
  • Merge multiple Markdown files into a single document
  • Support GFM tables, code blocks, lists, and more

Docker Install and Configuration

This project is delivered as a Docker container. There is no local installation.

Requirements
  • Docker Engine 24+ or Docker Desktop
  • 2 GB RAM minimum (4 GB recommended)
  • Port 3000 available on the host
Quick start
docker pull revil0/madmermaidoc:latest

docker run --rm -p 3000:3000 \
  -e PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
  -e MMD_TEMPLATE_DOCX=/app/templates/reference.docx \
  -v mmd-data:/app/.data \
  revil0/madmermaidoc:latest

Open http://<ip-address or fqdn>:3000 in your browser.

services:
  madmermaidoc:
    image: revil0/madmermaidoc:latest
    container_name: madmermaidoc
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      NODE_ENV: production
      PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium
      MMD_TEMPLATE_DOCX: /app/templates/reference.docx
    volumes:
      - mmd-data:/app/.data

volumes:
  mmd-data:

Start with:

docker compose up -d
Configuration

The container is configured by environment variables.

VariablePurposeDefault
PUPPETEER_EXECUTABLE_PATHPath to Chromium inside the container/usr/bin/chromium
MMD_TEMPLATE_DOCXPath to the reference DOCX template/app/templates/reference.docx
MMD_PDF_STYLEPDF style name or pathgithub-light
MMD_PDF_CSSCustom CSS path for PDF outputempty
MMD_HIGHLIGHT_STYLESyntax highlight theme (Shiki)pygments
MMD_KEEP_PDF_HTMLKeep HTML used to generate PDF (1 to enable)0
Templates and data
  • Persistent data is stored in /app/.data. Use a volume to keep it across restarts.
  • PDF styles live in /app/templates/pdf. You can mount your own folder if needed.
  • To override the DOCX template, mount a file and point MMD_TEMPLATE_DOCX at it.

Example for a custom template:

docker run --rm -p 3000:3000 \
  -e MMD_TEMPLATE_DOCX=/app/templates/custom.docx \
  -v $(pwd)/templates:/app/templates \
  -v mmd-data:/app/.data \
  revil0/madmermaidoc:1.1.2

License

MIT. See LICENSE.

Disclaimer

This software is provided "as is", without warranty of any kind. You are solely responsible for validating outputs and ensuring the software meets your requirements before production use.

Code Syntax Highlighting

Powered by Shiki, supporting:

  • Web: JavaScript, TypeScript, HTML, CSS, JSON
  • Backend: Python, Java, Go, Rust, Ruby, PHP, C#
  • System: C, C++, Swift, Kotlin
  • Scripting: Bash, Shell, PowerShell
  • Others: SQL, YAML, XML, Markdown, Dockerfile

Code blocks are rendered with a light gray background, monospace font, and colored syntax.

Supported Mermaid Diagrams

  • flowchart (flowchart)
  • sequenceDiagram (sequence diagram)
  • classDiagram (class diagram)
  • erDiagram (ER diagram)
  • gantt (Gantt chart)
  • pie (pie chart)
  • Other Mermaid-supported diagram types

Tag summary

Content type

Image

Digest

sha256:8447e9fca

Size

1.3 GB

Last updated

7 months ago

docker pull revil0/madmermaidoc