Table of Contents

- Table of Contents -

Offline Reading: Exporting blog posts from HTML to ePub and PDF

Why Offline?

How it works

Conclusion

Offline Reading: Exporting blog posts from HTML to ePub and PDF

Jan. 19, 2026

This year marks the 10th anniversary of my blog. What started as an experiment has evolved into over 170 stories, averaging around 60 thousand pageviews a month. I recently started translating posts into Dutch, German, and Spanish, expanding the reach. And now I am introducing support for offline reading by making all posts available as ePub and PDF downloads.

Read willem.com posts on your favourite e-reader (like Kobo or reMarkable)

Why Offline?

Enjoy distraction free reading on e-ink devices like a Kobo or reMarkable which are kind to your eyes. Focus on the articles wherever and whenever you want as they are available as downloads that work offline and DRM-free. All willem.com ePubs and PDFs contain high quality images and feature beautiful resizable typography. I made a handy overview of ePub and PDF downloads here:

Download ePub and PDF

How it works

The willem.com website runs on the Lemmid content management system that is a static site generator, outputting optimised HTML suitable for high volume traffic and international distribution. I extended the NodeJS code to automatically export to ePub and PDF by using simplified HTML as input. See the source code snippets below: for ePub I use the epub-gen module; for PDF I use pandoc and LaTeX. I made a task manager that queues output jobs for individual translations and file formats, spreading computational load on the backend.

Conclusion

The reactions I have received on my posts come from all over the world and they inspire me to keep writing. With ePub and PDF support I hope to expand my reach even further by enabling more ways to read the articles. Enjoy!

ePub code with epub-gen

PDF code using Pandoc and LaTeX