Overview
Compile a directory of markdown into a document, using a template that knows the conventions of the kind of document you're writing.
You already write in markdown, and you keep it organized: a folder of files, numbered for order, maybe a README and some assets. That's good structure. But turning it into one polished, shareable document usually means pandoc incantations, a LaTeX toolchain, or a pile of glue scripts.
unipress does it in one command.
Quick start
Point it at your folder:
cd my-docs # a folder of .md files
unipress compile .There's no project to set up. The first time, unipress sees there's no config, offers to create a small document.yml for you, and produces the PDF: a clean, single-column article. It is A4, with typeset prose, an inline title block and no chapters. Numbered filenames (01-intro.md, 02-overview.md) set the section order; README.md and draft files (_notes.md) are left out.
Prefer no prompts? --yes takes the defaults, the A4 article and PDF output:
unipress compile . --yes
unipress compile . --yes --format epubThe generated document.yml is yours to keep and edit. It holds the title, the reading order and the output format. Re-run compile whenever the content changes.
A4 or US Letter?
The default page size is A4. In the US and Canada you'll want Letter. Open the generated document.yml and change book.trim from a4 to letter:
book:
kind: article
trim: letter # 8.5 × 11 in (was: a4)Then re-run unipress compile .. A couple of other one-line tweaks live in the same book: block: numbered sections (structure: { numberHeadings: true }) and a table of contents (structure: { toc: true }). See the article guide for the full list.
Install
If you have Node 22.12 or newer, install it from npm:
npm i -g @uniweb/unipressYour first compile downloads what it needs and keeps it in a cache: the template's foundation and, for a PDF, a Typst binary. There is nothing else to set up.
Start from a template
No content yet? Scaffold a starter:
unipress create my-book --template book --title "My Book" --author "Your Name"
cd my-book && unipress compile .create writes a content-only directory: markdown, a document.yml, and optional theme.yml and assets/. There is no package.json and no node_modules.
Pick the template that matches your document. It carries the typography and structure:
| Template | Makes | For |
|---|---|---|
| article | PDF, EPUB, Paged.js, Typst | A single-column paper, A4 or Letter, with no chapters. The default for a loose folder of markdown |
| book | PDF, EPUB, Paged.js, Typst | A trade book: long-form prose with chapters |
| monograph | PDF, EPUB, Paged.js, Typst | A scholarly monograph: royal-octavo, classical typography, citations |
| report | PDF, EPUB, Paged.js, Typst | A technical report: trade 7 × 10, block paragraphs |
| data-report | Excel, Word | Aggregate metrics across structured records |
| directory | Excel, Word | A flat listing of records |
Planning to publish? The publishing guide takes a book from your folder all the way to Amazon and print.
What it makes
| Format | What it's for |
|---|---|
| The finished, typeset document, with real typography and pagination, ready to print or share. Built on Typst, the modern typesetting system | |
| EPUB | The format Kindles and other ebook readers use |
| Paged.js HTML | Browser-paginated HTML you can print to PDF or post on the web |
| Typst source | The .typ files unipress feeds the compiler. Useful if you want to take the typesetting further yourself, or hand off to a designer |
Word (.docx) | From the data templates, when a committee or collaborator needs a Word file |
Excel (.xlsx) | From the data templates, when the document is structured data, such as a directory, a dataset or a registry |
Equations work in the standard LaTeX style: $E = mc^2$ inline, $...$ for displayed. Tables, lists, code blocks and images behave the way you'd expect from markdown.
Two ways to use it
For authors, unipress is a tool. Pick a template, write markdown, compile. The template knows the conventions of its kind of document. You handle the content, and it handles the rest.
For developers, unipress is an engine. A foundation you write declares what section types exist, where their data comes from, and what output formats it can emit. The same foundation can also drive a Uniweb website. Read more in For developers.