md-pdf-studio 1.1.0 β 2.1.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/LICENSE +21 -0
- package/README.md +214 -208
- package/bin/cli.js +188 -186
- package/package.json +62 -58
- package/src/browser/renderer.js +142 -142
- package/src/core/cover.js +40 -40
- package/src/core/frontmatter.js +54 -54
- package/src/core/index.js +80 -80
- package/src/core/parser.js +164 -163
- package/src/core/sanitizer.js +57 -35
- package/src/core/templates.js +192 -192
- package/src/core/themes/academic.js +20 -20
- package/src/core/themes/cover.js +14 -14
- package/src/core/themes/cyberpunk.js +21 -21
- package/src/core/themes/dark.js +21 -21
- package/src/core/themes/ebook.js +20 -20
- package/src/core/themes/github.js +21 -21
- package/src/core/themes/highlight.js +38 -0
- package/src/core/themes/index.js +58 -52
- package/src/core/themes/minimal.js +20 -20
- package/src/core/themes/modern.js +34 -34
- package/src/core/toc.js +72 -72
- package/src/core/utils.js +85 -85
- package/src/index.js +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Van Nguyen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,208 +1,214 @@
|
|
|
1
|
-
# π convert-md-to-pdf
|
|
2
|
-
|
|
3
|
-
> A powerful CLI tool and **Browser Extension (Manifest V3)** to convert Markdown (`.md`) files, raw text, or web pages into beautifully styled, high-quality PDF & static HTML documents. Built with support for **Cover Pages**, **Dotted Leader Line Table of Contents (TOC)**, **Mermaid.js diagrams**, **LaTeX Math**, **GitHub Callout Alerts**, **Custom CSS Injection**, **7 Preset Themes**, and **Open-Source Font Selection**.
|
|
4
|
-
|
|
5
|
-
[](https://chromewebstore.google.com/detail/markdown-to-pdf-converter/djikikejkmkklfeklfmddaadilhahamj)
|
|
6
|
-
[](https://chromewebstore.google.com/detail/markdown-to-pdf-converter/djikikejkmkklfeklfmddaadilhahamj)
|
|
7
|
-
[](https://www.npmjs.com/package/md-pdf-studio)
|
|
8
|
-
[](https://www.npmjs.com/package/md-pdf-studio)
|
|
9
|
-

|
|
10
|
-

|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## β¨ Features
|
|
15
|
-
|
|
16
|
-
- π§© **Browser Extension (Manifest V3)**:
|
|
17
|
-
- Drag & drop single or **multiple `.md` files** directly into the popup.
|
|
18
|
-
- Auto-saved draft text in popup & conversion history list with 1-click re-open.
|
|
19
|
-
- Convert active web page or GitHub raw Markdown files with 1 click.
|
|
20
|
-
- Context menu integration: Right-click selected Markdown text or any page -> "Convert to PDF".
|
|
21
|
-
- Full-page Print Preview with live theme switching, Font Selector, Auto TOC, Custom CSS, and native PDF/HTML export.
|
|
22
|
-
- π **Auto Cover Page Generator**: Generate elegant document report cover pages via YAML Front Matter (`cover: true`) or `--cover` flag.
|
|
23
|
-
- π **Dotted Leader Line Table of Contents (TOC)**: Auto-generates publication-grade TOC with dotted leader lines (`...`) and clickable anchor links (`--toc`).
|
|
24
|
-
- π¨ **7 Preset Themes**: `modern` (default), `dark`, `academic`, `github`, `ebook`, `cyberpunk`, and `minimal`.
|
|
25
|
-
- π€ **Open-Source Font Selector**: 100% free under SIL OFL / Apache 2.0 (`Inter`, `Roboto`, `Lora`, `Merriweather`, `JetBrains Mono`, `Fira Code`).
|
|
26
|
-
- β‘ **Live Watch Mode & HTML Export**: Real-time auto-recompilation on file changes (`-w, --watch`) and direct static HTML export (`-f, --format html`).
|
|
27
|
-
- π **CLI & Batch Conversion**: Convert single files or batch process directories with wildcard patterns.
|
|
28
|
-
- π¨ **Custom CSS Injection**: Inject custom branding CSS stylesheets (`-c, --css custom.css`).
|
|
29
|
-
- π **Mermaid Diagrams**: Sequence diagrams (with auto note wrapping), flowcharts, class diagrams, and gantt charts.
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
| `-
|
|
94
|
-
| `-
|
|
95
|
-
| `-
|
|
96
|
-
|
|
|
97
|
-
| `--
|
|
98
|
-
| `--
|
|
99
|
-
|
|
|
100
|
-
| `-
|
|
101
|
-
| `-
|
|
102
|
-
| `-
|
|
103
|
-
| `-
|
|
104
|
-
|
|
|
105
|
-
| `--no-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
β
|
|
170
|
-
|
|
171
|
-
β
|
|
172
|
-
β β
|
|
173
|
-
β β β βββ
|
|
174
|
-
β β β βββ
|
|
175
|
-
β β β
|
|
176
|
-
β β βββ
|
|
177
|
-
β β βββ
|
|
178
|
-
β β βββ
|
|
179
|
-
β β βββ
|
|
180
|
-
β β βββ
|
|
181
|
-
β β
|
|
182
|
-
β β βββ
|
|
183
|
-
β β
|
|
184
|
-
β
|
|
185
|
-
β
|
|
186
|
-
βββ
|
|
187
|
-
β βββ
|
|
188
|
-
β βββ
|
|
189
|
-
β
|
|
190
|
-
β
|
|
191
|
-
β
|
|
192
|
-
|
|
193
|
-
β
|
|
194
|
-
βββ
|
|
195
|
-
β
|
|
196
|
-
βββ
|
|
197
|
-
βββ
|
|
198
|
-
βββ
|
|
199
|
-
|
|
200
|
-
βββ
|
|
201
|
-
βββ
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
1
|
+
# π convert-md-to-pdf
|
|
2
|
+
|
|
3
|
+
> A powerful CLI tool and **Browser Extension (Manifest V3)** to convert Markdown (`.md`) files, raw text, or web pages into beautifully styled, high-quality PDF & static HTML documents. Built with support for **Cover Pages**, **Dotted Leader Line Table of Contents (TOC)**, **Mermaid.js diagrams**, **LaTeX Math**, **GitHub Callout Alerts**, **Custom CSS Injection**, **7 Preset Themes**, and **Open-Source Font Selection**.
|
|
4
|
+
|
|
5
|
+
[](https://chromewebstore.google.com/detail/markdown-to-pdf-converter/djikikejkmkklfeklfmddaadilhahamj)
|
|
6
|
+
[](https://chromewebstore.google.com/detail/markdown-to-pdf-converter/djikikejkmkklfeklfmddaadilhahamj)
|
|
7
|
+
[](https://www.npmjs.com/package/md-pdf-studio)
|
|
8
|
+
[](https://www.npmjs.com/package/md-pdf-studio)
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## β¨ Features
|
|
15
|
+
|
|
16
|
+
- π§© **Browser Extension (Manifest V3)**:
|
|
17
|
+
- Drag & drop single or **multiple `.md` files** directly into the popup.
|
|
18
|
+
- Auto-saved draft text in popup & conversion history list with 1-click re-open.
|
|
19
|
+
- Convert active web page or GitHub raw Markdown files with 1 click.
|
|
20
|
+
- Context menu integration: Right-click selected Markdown text or any page -> "Convert to PDF".
|
|
21
|
+
- Full-page Print Preview with live theme switching, Font Selector, Auto TOC, Custom CSS, and native PDF/HTML export.
|
|
22
|
+
- π **Auto Cover Page Generator**: Generate elegant document report cover pages via YAML Front Matter (`cover: true`) or `--cover` flag.
|
|
23
|
+
- π **Dotted Leader Line Table of Contents (TOC)**: Auto-generates publication-grade TOC with dotted leader lines (`...`) and clickable anchor links (`--toc`).
|
|
24
|
+
- π¨ **7 Preset Themes**: `modern` (default), `dark`, `academic`, `github`, `ebook`, `cyberpunk`, and `minimal`.
|
|
25
|
+
- π€ **Open-Source Font Selector**: 100% free under SIL OFL / Apache 2.0 (`Inter`, `Roboto`, `Lora`, `Merriweather`, `JetBrains Mono`, `Fira Code`).
|
|
26
|
+
- β‘ **Live Watch Mode & HTML Export**: Real-time auto-recompilation on file changes (`-w, --watch`) and direct static HTML export (`-f, --format html`).
|
|
27
|
+
- π **CLI & Batch Conversion**: Convert single files or batch process directories with wildcard patterns.
|
|
28
|
+
- π¨ **Custom CSS Injection**: Inject custom branding CSS stylesheets (`-c, --css custom.css`).
|
|
29
|
+
- π **Mermaid Diagrams**: Sequence diagrams (with auto note wrapping), flowcharts, class diagrams, and gantt charts.
|
|
30
|
+
- π **Syntax Highlighting**: Fenced code blocks that name a language (` ```js `, ` ```python `, ` ```diff `, β¦) are coloured at build time with highlight.js β no CDN, so it also works offline and in static HTML export. Colours follow the theme's code block background. Works in the CLI and in the extension preview.
|
|
31
|
+
- π **LaTeX Math Support**: Mathematical equations rendered with KaTeX.
|
|
32
|
+
- π‘ **GitHub Callout Box Alerts**: Support for `> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!IMPORTANT]`, and `> [!CAUTION]`.
|
|
33
|
+
- π» **ASCII UI Mockups**: Styled dark-theme boxes for terminal output & ASCII wireframe mockups.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## π Extension Installation & Usage
|
|
38
|
+
|
|
39
|
+
### π Direct Install from Chrome Web Store (Recommended)
|
|
40
|
+
You can install the official published extension directly with 1-click:
|
|
41
|
+
π **[Install Markdown to PDF Converter on Chrome Web Store](https://chromewebstore.google.com/detail/markdown-to-pdf-converter/djikikejkmkklfeklfmddaadilhahamj)**
|
|
42
|
+
|
|
43
|
+
### π οΈ Developer Unpacked Installation (Local Build):
|
|
44
|
+
1. Clone or download this repository:
|
|
45
|
+
```bash
|
|
46
|
+
git clone https://github.com/vannt-dev/convert-md-to-pdf.git
|
|
47
|
+
```
|
|
48
|
+
2. Open your browser and navigate to `chrome://extensions` (or `edge://extensions`).
|
|
49
|
+
3. Enable **Developer mode** (toggle in the top-right corner).
|
|
50
|
+
4. Click **Load unpacked** (TαΊ£i tiα»n Γch ΔΓ£ giαΊ£i nΓ©n).
|
|
51
|
+
5. Select the **`extension`** directory inside this repository (or load `dist/extension-latest.zip`).
|
|
52
|
+
6. The **Markdown to PDF Converter** icon will appear in your browser toolbar!
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## π» CLI Installation & Usage
|
|
57
|
+
|
|
58
|
+
### Global Installation via npm / npx
|
|
59
|
+
The CLI is published on npm as [`md-pdf-studio`](https://www.npmjs.com/package/md-pdf-studio):
|
|
60
|
+
```bash
|
|
61
|
+
npm install -g md-pdf-studio
|
|
62
|
+
```
|
|
63
|
+
or run directly with `npx`:
|
|
64
|
+
```bash
|
|
65
|
+
npx md-pdf-studio input.md
|
|
66
|
+
```
|
|
67
|
+
A global install provides the `md-pdf-studio` command and the `md2pdf` and `convert-md-to-pdf` aliases.
|
|
68
|
+
PDF output uses a locally installed Google Chrome, Microsoft Edge or Chromium.
|
|
69
|
+
|
|
70
|
+
> The npm package named `convert-md-to-pdf` is an unrelated project; install `md-pdf-studio` for this tool.
|
|
71
|
+
|
|
72
|
+
### CLI Examples:
|
|
73
|
+
```bash
|
|
74
|
+
# Convert a Markdown file with Cover Page, Auto TOC & Cyberpunk Theme
|
|
75
|
+
npx md-pdf-studio input.md --cover --toc -t cyberpunk --font "Fira Code" -o output.pdf
|
|
76
|
+
|
|
77
|
+
# Watch file and auto-recompile on save
|
|
78
|
+
npx md-pdf-studio input.md -w -f html
|
|
79
|
+
|
|
80
|
+
# Batch convert multiple files to an output directory
|
|
81
|
+
npx md-pdf-studio file1.md file2.md -o output_dir/
|
|
82
|
+
|
|
83
|
+
# Convert entire directory of .md files
|
|
84
|
+
npx md-pdf-studio ./docs/ -o ./dist/
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## π οΈ CLI Options
|
|
90
|
+
|
|
91
|
+
| Flag | Alias | Description | Default |
|
|
92
|
+
| :--- | :--- | :--- | :--- |
|
|
93
|
+
| `-o, --output <path>`| | Output PDF/HTML file path or target directory | Auto-derived |
|
|
94
|
+
| `-f, --format <format>`| | Output format: `pdf`, `html` | `pdf` |
|
|
95
|
+
| `-w, --watch` | | Live watch input file and auto-recompile on change | `false` |
|
|
96
|
+
| `-t, --theme <theme>` | | Theme: `modern`, `dark`, `academic`, `github`, `ebook`, `cyberpunk`, `minimal` | `modern` |
|
|
97
|
+
| `--font <font>` | | Font family: `Inter`, `Roboto`, `Lora`, `Merriweather`, `JetBrains Mono`, `Fira Code` | `Inter` |
|
|
98
|
+
| `--cover` | | Auto-generate document report Cover Page | `false` |
|
|
99
|
+
| `--toc` | | Auto-generate Table of Contents with Dotted Leader Lines | `false` |
|
|
100
|
+
| `-p, --page-size <size>`| | Paper size: `A4`, `Letter`, `A3`, `Legal` | `A4` |
|
|
101
|
+
| `-l, --landscape` | | Use landscape page orientation | `false` |
|
|
102
|
+
| `-m, --margin <margin>`| | Custom page margin (e.g. `14mm 12mm 16mm 12mm`) | `14mm 12mm 16mm 12mm` |
|
|
103
|
+
| `-c, --css <path>` | | Custom CSS stylesheet file path to inject | |
|
|
104
|
+
| `-k, --keep-html` | | Keep temporary HTML file after conversion | `false` |
|
|
105
|
+
| `--no-mermaid` | | Disable Mermaid diagram rendering | `false` |
|
|
106
|
+
| `--no-katex` | | Disable KaTeX math formula rendering | `false` |
|
|
107
|
+
| `--no-highlight` | | Disable syntax highlighting of code blocks | `false` |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## π Front Matter Options
|
|
112
|
+
|
|
113
|
+
You can specify conversion settings directly inside your `.md` files using YAML Front Matter:
|
|
114
|
+
|
|
115
|
+
```yaml
|
|
116
|
+
---
|
|
117
|
+
title: "Quarterly Financial Report"
|
|
118
|
+
subtitle: "Q3 Fiscal Summary"
|
|
119
|
+
author: "Engineering Team"
|
|
120
|
+
date: "2026-08-11"
|
|
121
|
+
cover: true
|
|
122
|
+
toc: true
|
|
123
|
+
theme: github
|
|
124
|
+
font: Inter
|
|
125
|
+
pageSize: A4
|
|
126
|
+
landscape: false
|
|
127
|
+
highlight: true
|
|
128
|
+
---
|
|
129
|
+
# Document Executive Summary
|
|
130
|
+
...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## πΏ Git Flow & Automated Release Workflow
|
|
136
|
+
|
|
137
|
+
This project follows standard **Git Flow** branching and automated release publishing:
|
|
138
|
+
|
|
139
|
+
### π Branching Strategy
|
|
140
|
+
- **`main`**: Production-ready branch. Stores stable releases. Pushing a version tag `v*` from `main` triggers a release.
|
|
141
|
+
- **`develop`**: Active development branch. Daily commits, feature additions, and refactoring take place here.
|
|
142
|
+
|
|
143
|
+
### π Automated Release Pipeline
|
|
144
|
+
Whenever a version tag `v*` is pushed, GitHub Actions ([`.github/workflows/release.yml`](.github/workflows/release.yml)) builds from that tag and automatically:
|
|
145
|
+
1. Checks that the tag matches the version in `package.json` and `extension/manifest.json`, then runs the full unit test suite (`npm test`).
|
|
146
|
+
2. Bundles cross-platform extension zip artifacts (`dist/extension-vX.Y.Z.zip`).
|
|
147
|
+
3. Auto-generates release notes from commit history.
|
|
148
|
+
4. Publishes a new official **[GitHub Release](https://github.com/vannt-dev/convert-md-to-pdf/releases)** with downloadable ZIP binaries attached!
|
|
149
|
+
5. Publishes [`md-pdf-studio`](https://www.npmjs.com/package/md-pdf-studio) to npm with provenance, through npm trusted publishing (no token secret). A version already on npm is skipped.
|
|
150
|
+
|
|
151
|
+
To release an existing tag again (for example after a failed run), run the workflow manually with `tag_name`.
|
|
152
|
+
|
|
153
|
+
### π‘ 1-Click CLI Release Command
|
|
154
|
+
You can also bump version and trigger a release with a single CLI command:
|
|
155
|
+
```bash
|
|
156
|
+
npm run release <version|patch|minor|major>
|
|
157
|
+
# Example: npm run release 1.2.0
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Please review our [Git Commit & Push Workflow Guide (GIT_WORKFLOW.md)](GIT_WORKFLOW.md) for conventional commit guidelines and pre-commit checks.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## π Project Architecture
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
convert-md-to-pdf/
|
|
168
|
+
βββ bin/
|
|
169
|
+
β βββ cli.js # CLI executable with watch & format options
|
|
170
|
+
βββ src/
|
|
171
|
+
β βββ core/ # Shared modular conversion engine
|
|
172
|
+
β β βββ themes/ # Modular Theme CSS collection
|
|
173
|
+
β β β βββ index.js # Theme registry & font override builder
|
|
174
|
+
β β β βββ cover.js # Cover page CSS
|
|
175
|
+
β β β βββ modern.js # Modern blue theme
|
|
176
|
+
β β β βββ dark.js # Dark slate theme
|
|
177
|
+
β β β βββ academic.js # Academic serif theme
|
|
178
|
+
β β β βββ github.js # GitHub light theme
|
|
179
|
+
β β β βββ ebook.js # E-Book paper theme
|
|
180
|
+
β β β βββ cyberpunk.js # Cyberpunk neon dark theme
|
|
181
|
+
β β β βββ minimal.js # Minimal monochrome theme
|
|
182
|
+
β β βββ frontmatter.js # YAML front matter parser
|
|
183
|
+
β β βββ cover.js # Cover page generator
|
|
184
|
+
β β βββ toc.js # Dotted leader line TOC generator
|
|
185
|
+
β β βββ sanitizer.js # HTML sanitizer & escaping
|
|
186
|
+
β β βββ utils.js # Preprocessors & helper re-exports
|
|
187
|
+
β β βββ parser.js # Pipeline parser (Markdown -> HTML)
|
|
188
|
+
β β βββ templates.js # HTML document template builder
|
|
189
|
+
β β βββ index.js # Main library API entrypoint
|
|
190
|
+
β βββ browser/ # Headless browser rendering engine
|
|
191
|
+
β βββ renderer.js # Puppeteer Chrome/Edge launcher & PDF worker pool
|
|
192
|
+
βββ extension/ # Browser Extension (Manifest V3)
|
|
193
|
+
β βββ manifest.json
|
|
194
|
+
β βββ background/ # Service worker & context menus
|
|
195
|
+
β βββ content/ # Content script for raw MD pages
|
|
196
|
+
β βββ popup/ # Extension Popup UI (Batch file, Paste, Page, History)
|
|
197
|
+
β βββ preview/ # Print Preview & PDF/HTML export page
|
|
198
|
+
β βββ lib/ # Vendor libraries (marked, mermaid, katex)
|
|
199
|
+
β βββ icons/ # Extension icons (16, 48, 128)
|
|
200
|
+
βββ tests/ # Standalone test suite (7/7 PASS)
|
|
201
|
+
β βββ index.test.js
|
|
202
|
+
βββ dist/ # Built Chrome Extension zip artifacts
|
|
203
|
+
βββ examples/ # Usage examples & custom CSS templates
|
|
204
|
+
βββ package.json
|
|
205
|
+
βββ README.md
|
|
206
|
+
βββ PRIVACY_POLICY.md
|
|
207
|
+
βββ GIT_WORKFLOW.md
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## π License
|
|
213
|
+
|
|
214
|
+
Distributed under the MIT License. See [LICENSE](LICENSE) for details.
|