md2x 0.2.2 → 0.3.0

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,11 +1,12 @@
1
1
  # md2x
2
2
 
3
- Markdown → PDF/DOCX converter (local, no server). Supports Mermaid/Graphviz/Infographic/Vega/HTML/SVG rendering, math, and code highlighting.
3
+ Markdown → PDF/DOCX/HTML converter (local, no server). Supports Mermaid/Graphviz/Infographic/Vega/HTML/SVG rendering, math, and code highlighting.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/md2x.svg?style=flat-square)](https://www.npmjs.com/package/md2x)
6
6
 
7
7
  ## Usage
8
8
 
9
+ Export to PDF:
9
10
  ```bash
10
11
  npx md2x input.md
11
12
  ```
@@ -16,6 +17,29 @@ Export to DOCX:
16
17
  npx md2x input.md -f docx
17
18
  ```
18
19
 
20
+ Export to HTML:
21
+
22
+ ```bash
23
+ npx md2x input.md -f html
24
+ ```
25
+
26
+ HTML diagram modes:
27
+
28
+ ```bash
29
+ # Render diagrams in the browser on load (default)
30
+ # - uses online CDN scripts (Mermaid/@viz-js/viz/Vega-Lite/Infographic)
31
+ npx md2x input.md -f html --diagram-mode live
32
+
33
+ # Pre-render diagrams as embedded images (offline, stable)
34
+ npx md2x input.md -f html --diagram-mode img
35
+
36
+ # Render diagrams in the browser on load (keeps source blocks)
37
+ # Tip: Vega-Lite CDN major version is auto-selected from the spec $schema (v5 or v6).
38
+
39
+ # Keep diagram source blocks only (no rendering)
40
+ npx md2x input.md -f html --diagram-mode none
41
+ ```
42
+
19
43
  List themes:
20
44
 
21
45
  ```bash