@makuja/peek 1.11.0 → 1.12.1

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.
Files changed (3) hide show
  1. package/README.md +11 -1
  2. package/dist/index.mjs +549 -177
  3. package/package.json +8 -7
package/README.md CHANGED
@@ -10,10 +10,11 @@ Markdown and HTML preview CLI with live reload. Spins up a local web server and
10
10
  - **Syntax highlighting** - Code blocks are highlighted with Shiki
11
11
  - **Custom CSS** - Customize Markdown styles via `--css` flag or `~/.config/peek/style.css`
12
12
  - **Dark / Light theme** - Built-in theme toggle
13
+ - **Save as PDF** - In directory mode, save the shown file, or all Markdown files under a directory, as a PDF without the header and sidebar
13
14
 
14
15
  ## Requirements
15
16
 
16
- - Node.js >= 22.0.0
17
+ - Node.js >= 22.3.0
17
18
 
18
19
  ## Install
19
20
 
@@ -70,6 +71,15 @@ peek serves these files from the browsed directory (directory mode) or from the
70
71
  - Fonts: `woff`, `woff2`, `ttf`, `otf`
71
72
  - HTML: `html`, `htm`
72
73
 
74
+ ## Save as PDF
75
+
76
+ In directory mode, the **Save as PDF** button in the header opens a menu:
77
+
78
+ - **This file** - The shown file. Markdown prints in the light theme; an HTML file prints as its own page, whole.
79
+ - **A directory** - The browsed directory or a directory containing the shown file. All Markdown files under it, as listed in the file tree (so without files excluded by `.gitignore`), go into one PDF, each starting on a new page. HTML files are left out, and a directory with more than 200 Markdown files cannot be saved.
80
+
81
+ The choice opens in a new tab with the browser's print dialog. Choose **Save as PDF** as the destination; the file is named after the file (`README.md` → `README.pdf`) or the directory (`docs` → `docs.pdf`). Allow pop-ups for the peek URL if the browser blocks the new tab.
82
+
73
83
  ## Custom CSS
74
84
 
75
85
  Content styles for Markdown files can be customized in three ways (in priority order):