]> apps.delaporte.us Git - dotfiles.git/blob - doc/markdown.md
Payroll jupyter as separate task
[dotfiles.git] / doc / markdown.md
1
2
3 ## Markdown to HTML
4
5 The usual VSCode plugins add a lot of weird junk (telemetry, perhaps), so I decided to start using brute force and minimal `GoLang` code to convert my Markdown into HTML.
6
7 ### Setup
8
9 ```powershell
10 go install github.com/gomarkdown/mdtohtml@latest
11 mdtohtml -h
12 ```
13
14 ### Generate document
15
16 ```powershell
17 mdtohtml.exe -css https://edward.delaporte.us/css/edthedev.css .\Dashboard.md > Dashboard.html
18 ```
19
20 VSCode Settings:
21 ```json
22 "command-runner.terminal.name": "runCommand",
23 "command-runner.terminal.autoClear": true,
24 "command-runner.terminal.autoFocus": true,
25 "command-runner.commands": {
26 "markdown to HTML": "mdtohtml.exe -css https://edward.delaporte.us/css/edthedev.css ${file} > ${file}.html",
27 "HTML to PDF": "wkhtmltopdf.exe ${file}.html ${file}.pdf",
28 },
29 ```
30
31 Then `Ctrl+Shift+P`, `Run Command` and select `markdown to HTML`.
32
33 ## Markdown to PDF
34
35 ### Setup
36
37 Install [wkhtml2pdf.exe](https://wkhtmltopdf.org/) somewhere on my path.
38
39 ### Use
40
41 ```powershell
42 wkhtmltopdf.exe .\Dashboard.md.html dash.pdf
43 ```