@uniweb/unipress 0.4.28 → 0.4.30
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.
- package/README.md +39 -2
- package/docs/publishing/README.md +135 -0
- package/docs/publishing/covers-and-images.md +118 -0
- package/docs/publishing/ebooks.md +93 -0
- package/docs/publishing/isbn-and-metadata.md +90 -0
- package/docs/publishing/print.md +93 -0
- package/docs/publishing/size-and-layout.md +152 -0
- package/docs/troubleshooting.md +18 -1
- package/package.json +5 -5
- package/src/cli.js +5 -0
- package/src/commands/compile.js +14 -3
- package/src/compile.js +4 -1
- package/src/content-loader.js +44 -7
- package/src/foundations-data.js +2 -2
- package/src/templates-data.js +6 -6
package/README.md
CHANGED
|
@@ -49,6 +49,8 @@ cd my-book && unipress compile .
|
|
|
49
49
|
|
|
50
50
|
`create` writes a content-only directory — markdown, a `document.yml`, optional `theme.yml` and `assets/`; no `package.json`, no `node_modules`. Pick the template that matches your document (see [Pick a template](#pick-a-template)) — it carries the typography and structure so a book reads like a book and a directory like a directory.
|
|
51
51
|
|
|
52
|
+
> **Planning to publish?** There's a full author's guide that takes a book from your folder all the way to Amazon and print — [Publishing your book](./docs/publishing/README.md).
|
|
53
|
+
|
|
52
54
|
## What it makes
|
|
53
55
|
|
|
54
56
|
| Format | What it's for |
|
|
@@ -62,6 +64,10 @@ cd my-book && unipress compile .
|
|
|
62
64
|
|
|
63
65
|
Equations work in the standard LaTeX style — `$E = mc^2$` for inline, `$$...$$` for displayed. Tables, lists, footnotes, code blocks, and images all behave the way you'd expect from markdown.
|
|
64
66
|
|
|
67
|
+
## Publishing your book
|
|
68
|
+
|
|
69
|
+
Making the files is half the job; getting your book onto Amazon, Apple Books, and print-on-demand is the other half. The **[Publishing your book](./docs/publishing/README.md)** guide is an end-to-end walkthrough written for authors — the proof → final workflow, covers and images, trim sizes, EPUB validation, print-on-demand, ISBNs, and metadata — with links to every store and service.
|
|
70
|
+
|
|
65
71
|
## Two ways to use it
|
|
66
72
|
|
|
67
73
|
**For authors.** unipress is a tool. Pick a template, write markdown, compile. The template knows the conventions for its kind of document — typography, structure, the bits that make a book look like a book and a directory look like a directory. You handle the content; the template handles everything else.
|
|
@@ -140,6 +146,11 @@ unipress compile <dir> [options]
|
|
|
140
146
|
- URL: https://…/entry.js
|
|
141
147
|
- path: ./foundation, /abs/path, …
|
|
142
148
|
--out <path> Output file (default: ./<dir-basename>.<ext>).
|
|
149
|
+
--variant <name> Build an alternate top-level config <name>.yml inside <dir>
|
|
150
|
+
(e.g. --variant document-book → document-book.yml) instead of the
|
|
151
|
+
default document.yml. Lets one manuscript hold several cuts —
|
|
152
|
+
an A4 article and a trade book — side by side. The name is used
|
|
153
|
+
as given (a .yml extension is assumed if omitted).
|
|
143
154
|
--config <path> Explicit config file (default: <dir>/unipress.config.js).
|
|
144
155
|
--typst-binary <p> Path to a typst binary (skips the managed download).
|
|
145
156
|
--keep-temp On typst-compile failure, keep the temp dir for inspection.
|
|
@@ -192,6 +203,29 @@ The content-directory-level config. Fields unipress reads:
|
|
|
192
203
|
|
|
193
204
|
`site.yml` is also accepted as a fallback for compatibility with existing Uniweb site directories.
|
|
194
205
|
|
|
206
|
+
#### Several cuts of one manuscript
|
|
207
|
+
|
|
208
|
+
Keep more than one top-level config beside your content and pick one per build with
|
|
209
|
+
`--variant`. The same chapters can ship as an A4 article and a trade book:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
my-book/
|
|
213
|
+
document.yml # A4 article (the default: unipress compile .)
|
|
214
|
+
document-book.yml # trade 6×9 with covers
|
|
215
|
+
assets/front.png
|
|
216
|
+
01-intro.md 02-…
|
|
217
|
+
|
|
218
|
+
unipress compile . # → article (document.yml)
|
|
219
|
+
unipress compile . --variant document-book # → book (document-book.yml)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
`--variant <name>` reads `<name>.yml` from the content directory — the name is used as
|
|
223
|
+
given (no prefixing) with `.yml` assumed when omitted. Config-declared assets —
|
|
224
|
+
`book.covers.front`, banners, logos — are resolved from the config the build reads, so
|
|
225
|
+
**covers must live in the config unipress reads** (the `--variant` file or the default
|
|
226
|
+
`document.yml`), not in a `unipress.config.js` `--config` override, whose asset paths
|
|
227
|
+
aren't scanned.
|
|
228
|
+
|
|
195
229
|
### `unipress.config.js`
|
|
196
230
|
|
|
197
231
|
Optional ESM file for things awkward in YAML — imports, computed values, format-specific overrides. Auto-discovered at `<dir>/unipress.config.js` or explicit via `--config <path>`.
|
|
@@ -236,9 +270,12 @@ unipress is **pre-1.0**. The CLI is stable enough to write real documents with
|
|
|
236
270
|
|
|
237
271
|
**Foundations are fetched on first use.** The bundled templates pin foundations served from `https://uniweb.github.io/unipress/foundations/…`; the first compile downloads and caches the one your `document.yml` names (alongside the Typst binary). To iterate on a foundation locally, pass `--foundation <path>` pointing at a built foundation directory; to point at a different registry, set `UNIWEB_REGISTRY_URL`.
|
|
238
272
|
|
|
239
|
-
##
|
|
273
|
+
## Documentation
|
|
240
274
|
|
|
241
|
-
|
|
275
|
+
- **[Publishing your book](./docs/publishing/README.md)** — the end-to-end guide for authors: the proof → final workflow, covers and images, trim sizes, EPUB, print-on-demand, ISBNs, and metadata.
|
|
276
|
+
- **Template guides** — conventions and settings per document kind: [article](./docs/templates/article.md), [book](./docs/templates/book.md), [monograph](./docs/templates/monograph.md), [report](./docs/templates/report.md), [data-report](./docs/templates/data-report.md), [directory](./docs/templates/directory.md).
|
|
277
|
+
- **[Troubleshooting](./docs/troubleshooting.md)** — common errors and fixes; every named error class maps to a cause and a concrete next step.
|
|
278
|
+
- **[For developers](./docs/for-developers.md)** — building a foundation: section types, data sources, and custom output formats.
|
|
242
279
|
|
|
243
280
|
## See also
|
|
244
281
|
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Publishing your book
|
|
2
|
+
|
|
3
|
+
You've written a book. unipress turns your folder of markdown into the files a
|
|
4
|
+
publisher or store needs — a print-ready PDF, an EPUB, a shareable digital
|
|
5
|
+
edition. This guide covers the rest of the journey: what those files are, how to
|
|
6
|
+
make them well, and how to get your book onto Amazon, Apple Books, and print-on-
|
|
7
|
+
demand services so readers can buy it.
|
|
8
|
+
|
|
9
|
+
It's written for authors, not programmers. Where a step needs a command, it's one
|
|
10
|
+
line. Where it needs a decision (a trim size, an ISBN, a store), it's explained in
|
|
11
|
+
plain terms with a link to the authoritative source.
|
|
12
|
+
|
|
13
|
+
> This guide is about **publishing**. For the full list of `document.yml` settings
|
|
14
|
+
> — every trim, font, and structure toggle — see the [`book` template
|
|
15
|
+
> reference](../templates/book.md).
|
|
16
|
+
|
|
17
|
+
## The journey
|
|
18
|
+
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart LR
|
|
21
|
+
W[Write] --> P[Proof]
|
|
22
|
+
P -->|revise| P
|
|
23
|
+
P --> F[Finalize]
|
|
24
|
+
F --> E[EPUB]
|
|
25
|
+
F --> D[Digital PDF]
|
|
26
|
+
F --> I[Print interior]
|
|
27
|
+
E --> SE[Ebook stores]
|
|
28
|
+
D --> SD[Sell direct]
|
|
29
|
+
I --> SP[Print-on-demand]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
1. **Write and proof.** Draft in markdown, compile constantly, read, revise.
|
|
33
|
+
2. **Finalize.** Set your trim size, add covers and front matter, do a layout pass.
|
|
34
|
+
3. **Produce your files.** An EPUB for ebook stores, a print-ready interior for
|
|
35
|
+
print-on-demand, a digital PDF to sell or share.
|
|
36
|
+
4. **Publish.** Upload to the stores, order a proof copy, set your price, go live.
|
|
37
|
+
|
|
38
|
+
## Two builds: a proof and a final
|
|
39
|
+
|
|
40
|
+
unipress lets one manuscript produce several **cuts** — different shapes of the
|
|
41
|
+
same content — from one folder, using [`--variant`](../../README.md#cli-reference).
|
|
42
|
+
The recommended setup is two configs side by side:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
my-book/
|
|
46
|
+
document.yml # the PROOF — unipress compile .
|
|
47
|
+
document-book.yml # the FINAL — unipress compile . --variant book
|
|
48
|
+
assets/front.png assets/back.png
|
|
49
|
+
01-… 02-… (your chapters)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**`document.yml` — your proofing copy (the default).** A comfortable single-column
|
|
53
|
+
read on Letter or A4, generous margins for notes, **no covers**. Build it with a
|
|
54
|
+
bare `unipress compile .` — fast, so you run it constantly while writing. This is
|
|
55
|
+
where you catch typos, awkward sentences, and pacing.
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
# document.yml
|
|
59
|
+
format: pdf
|
|
60
|
+
paths: { pages: . }
|
|
61
|
+
book:
|
|
62
|
+
kind: article # single column, roomy — easy to read and mark up
|
|
63
|
+
trim: letter # or a4
|
|
64
|
+
content: [ ... ]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**`document-book.yml` — your final book (a variant).** The real trade 6×9, with
|
|
68
|
+
covers and full front matter. Build it with `unipress compile . --variant book`.
|
|
69
|
+
This is the file you send to a store, and — via `--format epub` — your ebook. Build
|
|
70
|
+
it near the end to also proof the **layout**: page breaks, widowed lines, where
|
|
71
|
+
images land. Things the proofing copy can't show you.
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
# document-book.yml
|
|
75
|
+
format: pdf
|
|
76
|
+
paths: { pages: . }
|
|
77
|
+
book:
|
|
78
|
+
trim: trade-6x9
|
|
79
|
+
structure: { titlePage: true, copyrightPage: true, toc: true, frontMatterNumbering: roman }
|
|
80
|
+
covers: { front: assets/front.png, back: assets/back.png }
|
|
81
|
+
content: [ ... ]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Why this split? You compile a hundred times while writing, so the least-friction
|
|
85
|
+
default should be the fast reading copy. The polished book — heavier, with
|
|
86
|
+
full-bleed cover art — is the deliberate "I'm ready to publish" build. There are
|
|
87
|
+
two kinds of proofreading, and this covers both: **content** proofing in the proof
|
|
88
|
+
copy, **layout** proofing in the final.
|
|
89
|
+
|
|
90
|
+
> Going to print adds one more cut — a cover-less **print interior** for the
|
|
91
|
+
> print-on-demand service. See [print.md](./print.md#the-two-files-you-upload).
|
|
92
|
+
|
|
93
|
+
## What you'll produce
|
|
94
|
+
|
|
95
|
+
| File | Build | For |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| Proof PDF | `unipress compile .` | Reading and marking up while you write |
|
|
98
|
+
| Final PDF (with covers) | `unipress compile . --variant book` | A shareable/sellable digital edition; layout proofing |
|
|
99
|
+
| EPUB | `unipress compile . --variant book --format epub` | Ebook stores (Kindle, Apple, Kobo, Google) |
|
|
100
|
+
| Print interior PDF | `unipress compile . --variant print` | Uploading to print-on-demand (see [print.md](./print.md)) |
|
|
101
|
+
|
|
102
|
+
## Before you publish — a checklist
|
|
103
|
+
|
|
104
|
+
- [ ] **Content** proofread in the proof copy — spelling, grammar, facts, flow.
|
|
105
|
+
- [ ] **Layout** proofread in the final variant — no widowed headings, images in
|
|
106
|
+
place, chapters start cleanly, front matter correct.
|
|
107
|
+
- [ ] **Trim size** chosen and consistent everywhere ([size-and-layout.md](./size-and-layout.md)).
|
|
108
|
+
- [ ] **Covers** sized for your trim, front and back ([covers-and-images.md](./covers-and-images.md)).
|
|
109
|
+
- [ ] **Images** are high-resolution enough for print ([covers-and-images.md](./covers-and-images.md#images-in-your-book)).
|
|
110
|
+
- [ ] **Title page and copyright page** say what you want, including rights and
|
|
111
|
+
any ISBN ([isbn-and-metadata.md](./isbn-and-metadata.md)).
|
|
112
|
+
- [ ] **EPUB validates** ([ebooks.md](./ebooks.md#validate-before-you-upload)).
|
|
113
|
+
- [ ] **A physical proof copy ordered and read** before you press publish
|
|
114
|
+
([print.md](./print.md#order-a-proof-copy)).
|
|
115
|
+
|
|
116
|
+
## The rest of this guide
|
|
117
|
+
|
|
118
|
+
- **[size-and-layout.md](./size-and-layout.md)** — trim sizes, margins, bleed,
|
|
119
|
+
front matter, and typography. How to pick a shape for your book.
|
|
120
|
+
- **[covers-and-images.md](./covers-and-images.md)** — front and back covers, and
|
|
121
|
+
images inside the book. Dimensions, resolution, and the difference between the
|
|
122
|
+
cover unipress makes and the wrap-around cover a printer wants.
|
|
123
|
+
- **[ebooks.md](./ebooks.md)** — what an ebook is, generating and validating your
|
|
124
|
+
EPUB, and the stores and aggregators that sell it.
|
|
125
|
+
- **[print.md](./print.md)** — print-on-demand explained, the two files you
|
|
126
|
+
upload, KDP Print vs IngramSpark, and ordering a proof.
|
|
127
|
+
- **[isbn-and-metadata.md](./isbn-and-metadata.md)** — ISBNs, the metadata stores
|
|
128
|
+
ask for, and your copyright page.
|
|
129
|
+
|
|
130
|
+
## What unipress does and doesn't do
|
|
131
|
+
|
|
132
|
+
unipress produces the **files**: PDF, EPUB, Word, spreadsheet. That's the
|
|
133
|
+
technical handoff. It doesn't upload your book, generate ISBNs, design your cover,
|
|
134
|
+
edit your prose, or market your book — those are yours (or a professional's) to do.
|
|
135
|
+
This guide points you at how.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Covers and images
|
|
2
|
+
|
|
3
|
+
Two kinds of artwork go into a book: the **covers** (front and back), and the
|
|
4
|
+
**images** inside the text. unipress handles both — this page covers how to add
|
|
5
|
+
them and how to make them the right size and resolution for print.
|
|
6
|
+
|
|
7
|
+
## Covers
|
|
8
|
+
|
|
9
|
+
Your book has a front cover and, optionally, a back cover. Put the image files in
|
|
10
|
+
your project's `assets/` folder and point to them under `book.covers`:
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
# document-book.yml (your final variant)
|
|
14
|
+
book:
|
|
15
|
+
covers:
|
|
16
|
+
front: assets/front.png
|
|
17
|
+
back: assets/back.png
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
That's it. On the next build the front cover becomes the first page of the PDF and
|
|
21
|
+
the thumbnail of your EPUB; the back cover becomes the last page of the PDF. (EPUBs
|
|
22
|
+
have no back cover — ebook readers only use the front.)
|
|
23
|
+
|
|
24
|
+
> **Covers must live in the config unipress actually reads** — your default
|
|
25
|
+
> `document.yml` or the file you pass to `--variant`. Covers set only in a
|
|
26
|
+
> `unipress.config.js` (`--config`) won't be picked up. If a cover silently doesn't
|
|
27
|
+
> appear, see [troubleshooting](../troubleshooting.md#cover-image-or-other-config-asset-doesnt-appear-in-the-output).
|
|
28
|
+
|
|
29
|
+
### Size and resolution
|
|
30
|
+
|
|
31
|
+
Make the cover image the **same proportions as your trim** so it fills the page
|
|
32
|
+
without stretching or letterboxing. A 6 × 9 book is a 2 : 3 (0.667) ratio, so a
|
|
33
|
+
portrait image around **1800 × 2700 px** covers it at print quality (300 DPI at
|
|
34
|
+
6 × 9). For the ebook thumbnail, a tall image of at least **1600 × 2560 px** is a
|
|
35
|
+
safe, widely-accepted size.
|
|
36
|
+
|
|
37
|
+
| Your trim | Cover proportions | ~300 DPI pixel size |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| 6 × 9 in | 2 : 3 | 1800 × 2700 |
|
|
40
|
+
| 7 × 10 in | 7 : 10 | 2100 × 3000 |
|
|
41
|
+
| A5 (148 × 210 mm) | ~1 : 1.41 | 1748 × 2480 |
|
|
42
|
+
|
|
43
|
+
Use PNG or high-quality JPEG. The title and author usually live **in the artwork**
|
|
44
|
+
itself — if yours does, turn off the typeset title page so it isn't repeated:
|
|
45
|
+
`book.structure.titlePage: false` (see
|
|
46
|
+
[size-and-layout.md](./size-and-layout.md#front-matter)).
|
|
47
|
+
|
|
48
|
+
### The print cover is a different file
|
|
49
|
+
|
|
50
|
+
This is the one thing that surprises first-time authors. The `book.covers` images
|
|
51
|
+
above are your **digital** covers — used for the EPUB and the standalone PDF. A
|
|
52
|
+
**print** book needs something else: a single **wrap-around** cover image —
|
|
53
|
+
back + spine + front in one piece, with **bleed** past the edges.
|
|
54
|
+
|
|
55
|
+
The catch is the **spine width**, which depends on your page count and paper stock,
|
|
56
|
+
so you can only make the wrap cover once the interior is final. Every
|
|
57
|
+
print-on-demand service gives you a **cover template generator** that outputs the
|
|
58
|
+
exact dimensions for *your* book:
|
|
59
|
+
|
|
60
|
+
- [KDP cover calculator](https://kdp.amazon.com/cover-calculator)
|
|
61
|
+
- [IngramSpark cover template generator](https://myaccount.ingramspark.com/Portal/Tools/CoverTemplateGenerator)
|
|
62
|
+
|
|
63
|
+
Feed it your trim, page count, and paper, drop your art onto the template, and
|
|
64
|
+
upload that as the cover — separate from the interior PDF. See
|
|
65
|
+
[print.md](./print.md) for the full upload flow.
|
|
66
|
+
|
|
67
|
+
### Getting cover art made
|
|
68
|
+
|
|
69
|
+
A good cover sells the book; it's worth doing well. Realistic options:
|
|
70
|
+
|
|
71
|
+
- **Hire a designer** — [Reedsy](https://reedsy.com), [99designs](https://99designs.com),
|
|
72
|
+
or [Fiverr](https://www.fiverr.com) span a wide range of budgets.
|
|
73
|
+
- **Use a cover tool** — Canva and Adobe Express have book-cover templates.
|
|
74
|
+
- **Make your own** if you have the skill; start from your trim's proportions above.
|
|
75
|
+
|
|
76
|
+
Whichever you choose, match the size and bleed your print service asks for.
|
|
77
|
+
|
|
78
|
+
## Images in your book
|
|
79
|
+
|
|
80
|
+
Put image files in `assets/` and reference them from your markdown with a normal
|
|
81
|
+
image link. The book foundation numbers figures and renders your caption:
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+

|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The text in the brackets becomes the caption (and the accessibility description —
|
|
88
|
+
worth writing well). You don't manage figure numbers; the foundation does.
|
|
89
|
+
|
|
90
|
+
### Resolution: enough pixels to print
|
|
91
|
+
|
|
92
|
+
Screens are forgiving; print is not. A print needs about **300 pixels per inch at
|
|
93
|
+
the size the image appears on the page**. So an image printed 4.5 in wide (roughly
|
|
94
|
+
the text width of a 6 × 9 book) wants to be about **1350 px wide** minimum; a
|
|
95
|
+
full-page plate wants more. A photo that looks crisp on screen at 600 px will print
|
|
96
|
+
soft and blocky.
|
|
97
|
+
|
|
98
|
+
Rule of thumb: **printed width in inches × 300 = minimum pixels wide.** Supply the
|
|
99
|
+
highest-resolution originals you have; unipress embeds them at full quality, so the
|
|
100
|
+
source image is what determines how it prints.
|
|
101
|
+
|
|
102
|
+
### Color
|
|
103
|
+
|
|
104
|
+
Screens are RGB; presses are CMYK. Print-on-demand services accept RGB images and
|
|
105
|
+
convert them for you, which is fine for most books. If exact color fidelity matters
|
|
106
|
+
(art books, brand colors), ask your print service whether they want CMYK and
|
|
107
|
+
proof a physical copy before publishing — on-screen color never fully matches ink.
|
|
108
|
+
|
|
109
|
+
### Formats and file size
|
|
110
|
+
|
|
111
|
+
PNG for diagrams, line art, and anything with text or sharp edges; JPEG for
|
|
112
|
+
photographs. There's no need to hand-optimize — but very large originals make for
|
|
113
|
+
large PDFs, so a few-MB photo is plenty; you rarely need 20 MB camera raws.
|
|
114
|
+
|
|
115
|
+
## Next
|
|
116
|
+
|
|
117
|
+
- Set your [size and layout](./size-and-layout.md).
|
|
118
|
+
- Produce your [ebook](./ebooks.md) or go to [print](./print.md).
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Publishing an ebook
|
|
2
|
+
|
|
3
|
+
An **ebook** is your book as an [EPUB](https://en.wikipedia.org/wiki/EPUB) file —
|
|
4
|
+
the format every major store except Amazon takes directly, and that Amazon accepts
|
|
5
|
+
and converts. Unlike a PDF, an EPUB is **reflowable**: the reader's device chooses
|
|
6
|
+
the font, the size, and where lines break, so your book adapts to a phone, a
|
|
7
|
+
tablet, or a 7-inch e-reader. That's the mental shift — an ebook is your *content*,
|
|
8
|
+
not your print *layout*. Trim size, margins, and page breaks don't apply; the cover,
|
|
9
|
+
the text, the chapters, and the metadata do.
|
|
10
|
+
|
|
11
|
+
## Make your EPUB
|
|
12
|
+
|
|
13
|
+
One command, from your book folder:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
unipress compile . --variant book --format epub --out my-book.epub
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This uses your final variant, so it picks up your [covers](./covers-and-images.md)
|
|
20
|
+
— the front cover becomes the ebook's thumbnail — your chapters, and your title and
|
|
21
|
+
author. You get `my-book.epub`, ready to upload.
|
|
22
|
+
|
|
23
|
+
## Validate before you upload
|
|
24
|
+
|
|
25
|
+
Stores reject EPUBs that don't meet the standard, and a bad file can fail *after*
|
|
26
|
+
you think you've published. Check yours first with **epubcheck**, the official
|
|
27
|
+
validator:
|
|
28
|
+
|
|
29
|
+
- Online: the [EPUBCheck validator](https://www.w3.org/publishing/epubcheck/) (or
|
|
30
|
+
search "epubcheck online").
|
|
31
|
+
- A green result means every store will accept the file.
|
|
32
|
+
|
|
33
|
+
unipress produces valid EPUBs, but validating takes a minute and rules out a whole
|
|
34
|
+
category of upload problems — always do it.
|
|
35
|
+
|
|
36
|
+
## Where to sell it
|
|
37
|
+
|
|
38
|
+
Two strategies, and many authors use both:
|
|
39
|
+
|
|
40
|
+
### Direct to each store
|
|
41
|
+
|
|
42
|
+
Open an account with each retailer and upload your EPUB. More work, but you keep the
|
|
43
|
+
larger share and get each store's full tools and reporting.
|
|
44
|
+
|
|
45
|
+
| Store | Reaches | Sign up |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| **Amazon KDP** | Kindle — the largest ebook market | [kdp.amazon.com](https://kdp.amazon.com) |
|
|
48
|
+
| **Apple Books** | Apple devices | [authors.apple.com](https://authors.apple.com) |
|
|
49
|
+
| **Kobo Writing Life** | Kobo, and libraries via OverDrive | [kobo.com/writinglife](https://www.kobo.com/writinglife) |
|
|
50
|
+
| **Google Play Books** | Android and the web | [play.google.com/books/publish](https://play.google.com/books/publish) |
|
|
51
|
+
|
|
52
|
+
### Through an aggregator
|
|
53
|
+
|
|
54
|
+
Upload once; the aggregator distributes to many stores and pays you. Less work, and
|
|
55
|
+
they take a small cut. The main two:
|
|
56
|
+
|
|
57
|
+
- **[Draft2Digital](https://draft2digital.com)** — the popular default; reaches
|
|
58
|
+
Apple, Kobo, Barnes & Noble, and more (you can still do Amazon yourself).
|
|
59
|
+
- **[Smashwords](https://www.smashwords.com)** — now part of Draft2Digital; broad
|
|
60
|
+
reach including library channels.
|
|
61
|
+
|
|
62
|
+
A common setup: **KDP directly** (for Amazon's reach and terms) plus an
|
|
63
|
+
**aggregator** for everywhere else.
|
|
64
|
+
|
|
65
|
+
## Pricing and royalties
|
|
66
|
+
|
|
67
|
+
Each store pays a **royalty** — a percentage of your list price — that depends on
|
|
68
|
+
the price you set and the store's terms. Amazon, for example, offers a higher
|
|
69
|
+
royalty band for ebooks priced within a middle range and a lower one outside it;
|
|
70
|
+
other stores have their own rules. Set your price on each store's dashboard, and
|
|
71
|
+
read its current royalty terms there — the numbers change, so trust the store over
|
|
72
|
+
any guide (including this one). As a starting point, look at what comparable books
|
|
73
|
+
in your category charge.
|
|
74
|
+
|
|
75
|
+
## A few practical notes
|
|
76
|
+
|
|
77
|
+
- **Cover thumbnail.** Kindle and most stores want a tall cover of at least
|
|
78
|
+
~1600 × 2560 px — the same front-cover image unipress already uses. See
|
|
79
|
+
[covers-and-images.md](./covers-and-images.md#size-and-resolution).
|
|
80
|
+
- **DRM.** At upload each store asks whether to apply DRM (copy protection). Most
|
|
81
|
+
independent authors publish **DRM-free**; it's your call and it's reversible only
|
|
82
|
+
in one direction, so decide deliberately.
|
|
83
|
+
- **ISBN.** An ebook doesn't strictly need one on every store (Amazon issues a free
|
|
84
|
+
internal ID), but some stores prefer or require an ISBN. See
|
|
85
|
+
[isbn-and-metadata.md](./isbn-and-metadata.md).
|
|
86
|
+
- **Metadata.** Title, description, categories, and keywords are entered on each
|
|
87
|
+
store, not baked into the file. Getting them right is how readers find you — see
|
|
88
|
+
[isbn-and-metadata.md](./isbn-and-metadata.md#metadata).
|
|
89
|
+
|
|
90
|
+
## Next
|
|
91
|
+
|
|
92
|
+
- Also selling in print? See [print.md](./print.md).
|
|
93
|
+
- Sort out your [ISBN and metadata](./isbn-and-metadata.md).
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# ISBNs and metadata
|
|
2
|
+
|
|
3
|
+
The last mile of publishing isn't about your book's pages — it's about the
|
|
4
|
+
information *around* it: the identifier stores file it under, and the title,
|
|
5
|
+
description, and categories that help readers find it.
|
|
6
|
+
|
|
7
|
+
## ISBNs
|
|
8
|
+
|
|
9
|
+
An **ISBN** is the book industry's identifier — the number behind the barcode.
|
|
10
|
+
Retailers and libraries use it to order and track your book.
|
|
11
|
+
|
|
12
|
+
A few things to know:
|
|
13
|
+
|
|
14
|
+
- **Each format needs its own ISBN.** Your paperback, your hardcover, and your
|
|
15
|
+
ebook are three products and get three different ISBNs. (You don't need one for a
|
|
16
|
+
PDF you only sell direct.)
|
|
17
|
+
- **You can get them free — with a catch.** KDP and IngramSpark will assign a free
|
|
18
|
+
ISBN, but it's **tied to that service** — you can't take it elsewhere, and that
|
|
19
|
+
service is listed as the publisher of record.
|
|
20
|
+
- **Or you can own them.** Buy your own from your country's ISBN agency and they're
|
|
21
|
+
**portable** across every service, with you as the publisher. In the **United
|
|
22
|
+
States** that's [Bowker](https://www.myidentifiers.com) (paid, usually cheaper in
|
|
23
|
+
blocks of 10). Many other countries issue them free or cheaply through a national
|
|
24
|
+
agency — search "ISBN" plus your country to find yours.
|
|
25
|
+
|
|
26
|
+
**Which to choose?** Owning your ISBN gives you flexibility and a cleaner
|
|
27
|
+
publisher record; the free option saves money. Many first-time authors start with
|
|
28
|
+
the free ISBNs and buy their own later. If you plan to sell the same edition across
|
|
29
|
+
multiple services, owning one avoids being locked to a single store.
|
|
30
|
+
|
|
31
|
+
### Where the ISBN goes
|
|
32
|
+
|
|
33
|
+
Once you have it, put it in your book's config so it prints on the copyright page:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
book:
|
|
37
|
+
isbn: "978-0-000000-0-0"
|
|
38
|
+
rights: "© 2026 Your Name. All rights reserved."
|
|
39
|
+
publisher: "Your Imprint"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You'll *also* enter the ISBN on each store's dashboard when you upload — the
|
|
43
|
+
copyright page shows it to readers; the store record makes it orderable.
|
|
44
|
+
|
|
45
|
+
## Metadata
|
|
46
|
+
|
|
47
|
+
Metadata is everything a store knows about your book besides the file itself. It's
|
|
48
|
+
entered on each store's dashboard (not baked into the EPUB or PDF), and it's how
|
|
49
|
+
readers discover you. Worth real thought:
|
|
50
|
+
|
|
51
|
+
- **Title and subtitle** — exact and consistent across stores. A subtitle is prime
|
|
52
|
+
search real estate for nonfiction.
|
|
53
|
+
- **Description / blurb** — your sales pitch. The first sentence has to earn the
|
|
54
|
+
second. Write it for a browsing reader, not a summary.
|
|
55
|
+
- **Categories (BISAC).** Stores classify books with
|
|
56
|
+
[BISAC subject codes](https://www.bisg.org/complete-bisac-subject-headings-list).
|
|
57
|
+
Pick the most specific categories that fit — a smaller, accurate category is
|
|
58
|
+
easier to rank in than a giant vague one.
|
|
59
|
+
- **Keywords** — the search terms a reader would type. Concrete beats clever.
|
|
60
|
+
- **Author name** — consistent everywhere, so all your books group under one author
|
|
61
|
+
page.
|
|
62
|
+
|
|
63
|
+
unipress carries a few of these into the book's own pages —
|
|
64
|
+
`book.title`, `book.subtitle`, `book.author`, `book.description`, `book.subject` —
|
|
65
|
+
but the store dashboards are the authoritative place for discovery metadata. Fill
|
|
66
|
+
them in carefully; they do more for sales than almost anything else in this guide.
|
|
67
|
+
|
|
68
|
+
## The copyright page
|
|
69
|
+
|
|
70
|
+
The imprint page on the back of the title page. Turn it on with
|
|
71
|
+
`book.structure.copyrightPage: true`, and it's built from your config:
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
book:
|
|
75
|
+
rights: "© 2026 Your Name. All rights reserved."
|
|
76
|
+
publisher: "Your Imprint"
|
|
77
|
+
isbn: "978-0-000000-0-0"
|
|
78
|
+
structure:
|
|
79
|
+
copyrightPage: true
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
A typical copyright page carries the copyright notice, a rights statement, the
|
|
83
|
+
edition/printing, the ISBN, and the publisher or imprint. If you're unsure what to
|
|
84
|
+
put, open a few books from your shelf in the same genre and follow their lead —
|
|
85
|
+
conventions vary by market and you can match yours.
|
|
86
|
+
|
|
87
|
+
## Next
|
|
88
|
+
|
|
89
|
+
- Back to the [overview and checklist](./README.md#before-you-publish--a-checklist).
|
|
90
|
+
- Make your [ebook](./ebooks.md) or [print](./print.md) files.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Publishing in print
|
|
2
|
+
|
|
3
|
+
You don't need a print run or a garage full of boxes. **Print-on-demand** (POD)
|
|
4
|
+
services print and ship each copy as a reader buys it — no inventory, no upfront
|
|
5
|
+
cost. You upload two files, set a price, and your book appears for sale as a real
|
|
6
|
+
paperback (or hardcover).
|
|
7
|
+
|
|
8
|
+
## The two files you upload
|
|
9
|
+
|
|
10
|
+
This is the part that trips up first-time authors. A print book is **two separate
|
|
11
|
+
files**, not one:
|
|
12
|
+
|
|
13
|
+
1. **The interior** — a PDF of the book's pages, **with no cover**. Just front
|
|
14
|
+
matter and chapters, sized to your trim.
|
|
15
|
+
2. **The cover** — a single **wrap-around** image: back + spine + front, with
|
|
16
|
+
bleed. Made from your print service's cover template. See
|
|
17
|
+
[covers-and-images.md](./covers-and-images.md#the-print-cover-is-a-different-file).
|
|
18
|
+
|
|
19
|
+
If you upload your with-covers PDF as the interior, your cover art prints as
|
|
20
|
+
interior *pages* — wrong. So print gets its own cover-less cut of the book.
|
|
21
|
+
|
|
22
|
+
### Make the interior
|
|
23
|
+
|
|
24
|
+
Add a `document-print.yml` beside your other configs — the same trade book, front
|
|
25
|
+
matter and all, but with the `covers` block **left out**:
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
# document-print.yml
|
|
29
|
+
format: pdf
|
|
30
|
+
paths: { pages: . }
|
|
31
|
+
book:
|
|
32
|
+
trim: trade-6x9
|
|
33
|
+
structure: { titlePage: true, copyrightPage: true, toc: true, frontMatterNumbering: roman }
|
|
34
|
+
# no covers: — the wrap-around cover is uploaded separately
|
|
35
|
+
content: [ ... ]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Build it:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
unipress compile . --variant print --format pdf --out interior.pdf
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`interior.pdf` is your print interior. It's already what POD services want: pages at
|
|
45
|
+
the exact trim size, with fonts embedded. Confirm your inside margin is generous
|
|
46
|
+
enough for your page count ([size-and-layout.md](./size-and-layout.md#margins-and-the-gutter)),
|
|
47
|
+
and if any interior image runs to the page edge, read the bleed note in
|
|
48
|
+
[size-and-layout.md](./size-and-layout.md#bleed).
|
|
49
|
+
|
|
50
|
+
## Choosing a print service
|
|
51
|
+
|
|
52
|
+
The two that matter for English-language books:
|
|
53
|
+
|
|
54
|
+
| Service | Reaches | Cost | Notes |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| **[Amazon KDP Print](https://kdp.amazon.com)** | Amazon | Free to set up | The easy default; huge reach, but Amazon-centric. |
|
|
57
|
+
| **[IngramSpark](https://www.ingramspark.com)** | Bookstores and libraries worldwide | Small per-title fee | The path to non-Amazon retail and library orders. |
|
|
58
|
+
|
|
59
|
+
Many authors use **both**: KDP for Amazon's reach, IngramSpark for everywhere else.
|
|
60
|
+
The same interior and cover files (adjusted to each service's exact template) feed
|
|
61
|
+
both. Read each service's file-prep guide before uploading —
|
|
62
|
+
[KDP's](https://kdp.amazon.com/help/topic/G201953020),
|
|
63
|
+
[IngramSpark's](https://help.ingramspark.com/hc/en-us/categories/360002107591).
|
|
64
|
+
|
|
65
|
+
## Order a proof copy
|
|
66
|
+
|
|
67
|
+
**Always order a physical proof and read it before you press publish.** A screen
|
|
68
|
+
can't show you ink density, paper feel, a cover that's a few millimeters off, or a
|
|
69
|
+
gutter that swallows text on a thick book. Both services offer proof copies (KDP
|
|
70
|
+
also has a free digital previewer, but order the real thing at least once). Read it
|
|
71
|
+
cover to cover with a pencil. This single step catches the errors that are
|
|
72
|
+
expensive to fix after readers have bought the book.
|
|
73
|
+
|
|
74
|
+
## Pricing
|
|
75
|
+
|
|
76
|
+
Your **list price** has to cover the **printing cost** (POD charges you per copy,
|
|
77
|
+
based on page count, trim, color vs. black-and-white, and paper) plus the retailer's
|
|
78
|
+
cut, and leave you a royalty. Each service shows your per-copy print cost and
|
|
79
|
+
computes your royalty as you set the price. Price too low and you earn nothing per
|
|
80
|
+
sale; too high and readers balk — look at comparable books in your category, and
|
|
81
|
+
remember color interiors cost noticeably more to print than black-and-white.
|
|
82
|
+
|
|
83
|
+
## ISBN
|
|
84
|
+
|
|
85
|
+
Print books effectively need an **ISBN** to sell through retail. KDP and IngramSpark
|
|
86
|
+
can assign one free (tied to that service), or you can buy your own so it's portable
|
|
87
|
+
across services. This is a real decision — see
|
|
88
|
+
[isbn-and-metadata.md](./isbn-and-metadata.md#isbns).
|
|
89
|
+
|
|
90
|
+
## Next
|
|
91
|
+
|
|
92
|
+
- Sort out your [ISBN and metadata](./isbn-and-metadata.md).
|
|
93
|
+
- Also publishing digitally? See [ebooks.md](./ebooks.md).
|