Skip to content

Commit 63c8e2d

Browse files
authored
feat: add code highlighter (#12)
* feat: add code highlighter * feat: add simple default css
1 parent abff63b commit 63c8e2d

File tree

6 files changed

+428
-10
lines changed

6 files changed

+428
-10
lines changed

deno.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
"@std/front-matter": "jsr:@std/front-matter@^1.0.5",
2424
"@std/path": "jsr:@std/path@^1.0.8",
2525
"@std/yaml": "jsr:@std/yaml@^1.0.5",
26-
"md4w": "npm:md4w@^0.2.6"
26+
"md4w": "npm:md4w@^0.2.6",
27+
"node-html-parser": "npm:node-html-parser@^7.0.1",
28+
"shiki": "npm:shiki@^1.26.1"
2729
},
2830
"exclude": [".gitattributes", ".github", "src/testdata", "**/*/*_test.ts"]
2931
}

deno.lock

+322-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/md-to-pdf.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function mdToPdf(
2121

2222
const browser = await launch();
2323
const page = await browser.newPage(`http://localhost:${server.addr.port}`);
24-
const pdf = await page.pdf();
24+
const pdf = await page.pdf({ printBackground: true });
2525

2626
// Close the browser and the server
2727
await browser.close();

0 commit comments

Comments
 (0)