You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document v1.0.0 flags, templates, and Docker usage
Add the PyPI downloads badge and switch the version badge to a dynamic one
so it stops going stale. Document every build flag in a table, add a
templates section and an error-checking section, and describe how to run
the published Docker image.
`doc-engine` ships with five layouts. Switch with `--template <name>`, and recolor any of them with `--accent`.
176
+
177
+
| Template | Look |
178
+
|---|---|
179
+
|`academic`| Serif IEEE-style report with cover page, table of contents, and running headers. The default. |
180
+
|`modern`| Clean sans-serif layout with generous spacing and a left-aligned cover. |
181
+
|`minimal`| No cover or table of contents — a compact title block, then straight into the content. |
182
+
|`technical`| Bold layout with a filled accent banner and section markers. Good for engineering docs. |
183
+
|`book`| Classic centered title page with chapter-style section breaks. |
184
+
185
+
```bash
186
+
doc-engine build --template book
187
+
doc-engine build --template modern --accent rose
188
+
```
189
+
190
+
Accent colors take a hex value (`#0ea5e9`) or one of these names: `blue`, `sky`, `indigo`, `violet`, `purple`, `red`, `rose`, `orange`, `amber`, `green`, `emerald`, `teal`, `slate`, `black`.
191
+
192
+
---
193
+
194
+
## Checking for Errors
195
+
196
+
Before compiling, `doc-engine` scans the Markdown for problems and reports them with the exact line and column, so you can jump straight to the fix:
197
+
198
+
```
199
+
README.md:42:8: error: link URL must not be empty
200
+
README.md:51:1: warning: image source is empty
201
+
```
202
+
203
+
Errors stop the build; warnings don't. Use `--dry-run` to run the check on its own without producing a PDF — handy in CI:
|**4. Template Injection**|`compiler.py`| Merge converted content with the selected template |
251
+
|**5. PDF Compilation**|`compiler.py`| Compile via `typst` Python bindings |
190
252
191
253
---
192
254
@@ -210,9 +272,9 @@ The converter module parses Markdown using [`mistune`](https://github.com/leptur
210
272
211
273
Special characters (`#`, `$`, `@`, `*`, `_`, etc.) are automatically escaped to prevent Typst interpretation.
212
274
213
-
### PDF Template
275
+
### PDF Templates
214
276
215
-
The included `report.typ` template provides:
277
+
Each template lives in `doc_engine/templates/` and exposes the same `setup_doc` entry point, so the compiler can swap between them with `--template`. The default `academic` template provides:
216
278
217
279
-**Cover page** with title, author, and date
218
280
-**Table of contents** with depth-3 navigation
@@ -221,6 +283,8 @@ The included `report.typ` template provides:
221
283
-**Code blocks** with rounded corners and subtle borders
222
284
-**Heading hierarchy** with accent-colored H2 sections
223
285
286
+
The other templates (`modern`, `minimal`, `technical`, `book`) keep the same content but change the fonts, layout, and cover. The accent color is injected at compile time, so `--accent` recolors any of them.
287
+
224
288
---
225
289
226
290
## Project Structure
@@ -233,11 +297,18 @@ doc-engine-cli/
233
297
│ ├── cli.py # Click-based CLI + Git detection
234
298
│ ├── converter.py # Markdown → Typst transpiler
235
299
│ ├── compiler.py # Typst → PDF compilation engine
0 commit comments