Skip to content
Blume
Esc
↑↓navigate↵open⌘Jpreview
On this page

Export

Let readers download any page as a PDF or EPUB — rendered client-side, so your static builds stay static and need no server infrastructure.

Blume can add an Export action to the page actions beneath the table of contents, letting readers save the page they’re on as a PDF or an EPUB. It’s off by default and entirely client-side — no server, and static builds stay static.

Enable it

Turn on both formats with a single toggle:

export: true,

To offer just one format, pass an object instead:

export: {
  pdf: true,
  epub: false,
},

Any format you omit (or set to false) is left out of the menu. With both off — the default — the Export action doesn’t appear at all.

PDF

Export to PDF opens your browser’s print dialog with a print stylesheet that strips the site chrome — header, sidebars, navigation, and everything after the article (last updated, feedback, previous and next links, the site footer), plus the copy buttons on code blocks — down to just the article. Collapsed expandable code blocks print in full, and a page read in the dark theme prints in the light one. Choose Save as PDF to finish. The same stylesheet applies when a reader prints from the browser’s own menu.

Because it prints the live, fully-styled page, the result keeps crisp, selectable text, real fonts, and syntax-highlighted code. It needs no dependencies and works the same in dev, in production, and on static hosts.

EPUB

Export to EPUB generates a self-contained .epub of the current page in the browser and downloads it — ready for Apple Books, Calibre, or any e-reader. The generator is loaded only when a reader clicks Export, so it never weighs down the rest of your site.

To keep the file readable on a device with no stylesheet or JavaScript of its own, Blume rewrites the page into clean, standalone HTML: syntax-highlighted code becomes plain monospace, decorative icons and copy buttons are dropped, and a built-in e-reader stylesheet handles spacing, code blocks, and tables. Links to other pages point at your live site, since the book holds only this page.

The book is titled after the page’s heading, takes the page’s language, and names your site’s title as its author and publisher. Images are fetched into the book; one the browser can’t fetch, such as an image on another host that doesn’t allow cross-origin requests, is left out, with a warning in the browser console.

What gets exported

Both formats export the single page a reader is viewing — not the whole site — which matches where the action lives, beneath that page’s table of contents. Like the other page actions, it sits in the right-hand column in windows at least 1,280px wide, and in the “On this page” dropdown above the content in narrower windows and on phones.

Last updated on

Was this page helpful?