Add KDP cover PDF generator
scripts/cover.js computes the exact cover canvas dimensions from the page count in book-meta.json (written by build.js), using the KDP Premium Color spine formula (0.002347 in/page), and renders a Nunjucks template to a single PDF containing back cover, spine, and front cover with bleed (0.125 in) and safe-zone overlay guides. - `pnpm cover` — generate output/cover.pdf - `pnpm all` — build interior + both PDFs in one command - Cover artwork slots: images/cover/front.png, images/cover/back.png Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -1,5 +1,10 @@
|
||||
.claude/
|
||||
node_modules/
|
||||
output/book.html
|
||||
# Keep the PDF in git if you want to track versions, otherwise add:
|
||||
output/cover.html
|
||||
output/book-meta.json
|
||||
# Interior PDF is large (~100 MB with placeholder pages) — excluded from git.
|
||||
# Re-add images and re-run `pnpm all` to regenerate.
|
||||
output/kaleidoskop.pdf
|
||||
# Cover PDF is small (~140 KB) — tracked in git.
|
||||
# output/cover.pdf
|
||||
|
||||
Reference in New Issue
Block a user