md2x 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # md2x
2
2
 
3
- Markdown → PDF/DOCX/HTML/Image converter (local, no server). Supports Mermaid/Graphviz/Infographic/Vega/Template(vue/svelte/html) rendering, math, and code highlighting.
3
+ Markdown → PDF/DOCX/HTML/Image converter. Supports Mermaid/Graphviz/Infographic/Vega/Template(vue/svelte/html) rendering, math, and code highlighting.
4
4
 
5
5
  > Supports MCP tools and md2x skill. 🎉
6
6
 
@@ -59,13 +59,15 @@ npx md2x -h
59
59
  | `--format` | `-f` | Output format | `pdf` | `pdf`, `docx`, `html`, `png`, `jpg/jpeg`, `webp` |
60
60
  | `--theme` | `-t` | Theme name | `default` | See `--list-themes` |
61
61
  | `--diagram-mode` | - | HTML/Image diagram rendering mode | `live` | `img`, `live`, `none` |
62
+ | `--live-runtime` | - | HTML live runtime injection strategy (only when `diagramMode: live`) | `cdn` | `inline`, `cdn` |
63
+ | `--live-runtime-url` | - | Custom runtime URL when `--live-runtime cdn` | - | URL |
62
64
  | `--hr-page-break` | - | Convert horizontal rules to page breaks | `true` for PDF/DOCX, `false` for HTML/Image | `true`, `false` |
63
65
  | `--templates-dir` | - | Extra template dir for md2x blocks (repeatable; resolved against input dir when relative) | - | Directory path |
64
66
  | `--list-themes` | - | List all available themes | - | - |
65
67
 
66
68
  ### Diagram Modes (HTML/Image)
67
69
 
68
- - **`live`** (default): Render diagrams in the browser on load using online CDN scripts (Mermaid, @viz-js/viz, Vega-Lite, Infographic)
70
+ - **`live`** (default): Render diagrams in the browser on load using the md2x live runtime (by default it is embedded into the output HTML; see `liveRuntime` below)
69
71
  - **`img`**: Pre-render diagrams as embedded images (offline, stable; no CDN)
70
72
  - **`none`**: Keep diagram source blocks only (no rendering)
71
73
 
@@ -124,6 +126,8 @@ title: "My Doc"
124
126
  standalone: true # full HTML document (default)
125
127
  baseTag: true # emit <base href="file://.../"> for resolving relative paths (default)
126
128
  diagramMode: live # img | live | none
129
+ liveRuntime: cdn # inline | cdn (default: cdn). Use "inline" for fully self-contained HTML.
130
+ # liveRuntimeUrl: "https://cdn.jsdelivr.net/npm/md2x@0.7.3/dist/renderer/" # chunked runtime base URL
127
131
  cdn: # optional: override CDN URLs (used when diagramMode: live)
128
132
  mermaid: "https://cdn.jsdelivr.net/npm/mermaid@11.12.2/dist/mermaid.min.js"
129
133
  # Template blocks: